Page 1 of 1

Checking for blank queries

Posted: Tue Jul 12, 2005 4:54 pm
by AlbinoJellyfish
Quick question

How do I check the results of a query to see if it returned no results?

Posted: Tue Jul 12, 2005 5:02 pm
by Burrito
couple ways:

Code: Select all

if(!$row = mysql_fetch_assoc($result))
//
$numrows = mysql_num_rows($result)