Page 1 of 1

mysql_query

Posted: Thu Apr 09, 2009 8:44 am
by php101
say im looking through a table using mysql_query for a certain name but the name is not there does mysql_query return false?

Re: mysql_query

Posted: Thu Apr 09, 2009 8:55 am
by jayshields
You mean by executing a SELECT * FROM `table` WHERE `name` = 'something' query?

It will return a result set resource. If no records in the table are returned then mysql_num_rows() will return 0 when passed the result resource.