List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:September 17 2005 8:11pm
Subject:Re: mysql_free_result() WITHOUT mysql_fetch_row()
View as plain text  
In the last episode (Sep 17), Miguel Cardenas said:
> I have a technical doubt, very simple but not mentioned in the manual...
> 
> What happens if I call mysql_free_result() after performing a query
> but without doing mysql_fetch_row() ???
> 
> It may sound strange, but just need to know if a data row exists more
> than the data itself...

A faster way would be to run a "SELECT count(*) WHERE ..." query, and
check the result.  Since you are not selecting any data, mysql is more
likely to be able to use index lookups to speed the query up.

-- 
	Dan Nelson
	dnelson@stripped
Thread
mysql_free_result() WITHOUT mysql_fetch_row()Miguel Cardenas17 Sep
  • Re: mysql_free_result() WITHOUT mysql_fetch_row()Dan Nelson17 Sep
    • Re: mysql_free_result() WITHOUT mysql_fetch_row()Miguel Cardenas18 Sep
      • Re: mysql_free_result() WITHOUT mysql_fetch_row()Pooly18 Sep
        • Re: mysql_free_result() WITHOUT mysql_fetch_row()Miguel Cardenas18 Sep
          • Re: mysql_free_result() WITHOUT mysql_fetch_row()Pooly19 Sep
Re: mysql_free_result() WITHOUT mysql_fetch_row()Pooly19 Sep
  • Re: mysql_free_result() WITHOUT mysql_fetch_row()Miguel Cardenas19 Sep
    • Re: mysql_free_result() WITHOUT mysql_fetch_row()SGreen19 Sep