mysql_query

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
php101
Forum Newbie
Posts: 2
Joined: Thu Apr 09, 2009 8:42 am

mysql_query

Post 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?
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: mysql_query

Post 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.
Post Reply