note 27069 deleted from function.mysql-query by jsheets

From: Date: Fri, 22 Nov 2002 00:13:41 +0000
Subject: note 27069 deleted from function.mysql-query by jsheets
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-39842@lists.php.net to get a copy of this message
I am doing a search page, and it outputs the results correctly. I would like it so that if no results are returned, I would like to say No results returned. Unfortunatley I am rather new at this and am not sure how to check for an empty set. here's what I have thus far: $result=mysql_query($query) or die("d'oh! query failed, master! what shall I do now?"); while ($line = mysql_fetch_array($result, MYSQL_NUM)) displays results line by line So far it works fine just displaying. but the while loop does not run if their is an empty set.

« previous php.notes (#39842) next »