RE: [PHP-WIN] Quick One... determining if there are no results re turned
| From: | Flint Doungchak | Date: | Tue, 05 Sep 2000 14:51:33 +0000 |
| Subject: | RE: [PHP-WIN] Quick One... determining if there are no results re turned | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2423@lists.php.net to get a copy of this message | ||
Hello,
Try using something like:
$num = mysql_num_rows($SQL_request);
$num will then equal the total number of rows returned. You can then use num
in your if then else statements. I hope this is what you wanted.
-Flint
-----Original Message-----
From: Asendorf, John [mailto:JAsendorf@lcounty.com]
Sent: Tuesday, September 05, 2000 7:43 AM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Quick One... determining if there are no results
returned
Here's a quick one... I wasted all my time finding chop() on my own this
morning so someone has to help me find the expression I need here...
I just need to know if the return from an SQL call is empty...
e.g.
if $SQL_request is empty {
do one thing
}
else {
do another thing
}
Anyone?
---------------------
John Asendorf - jasendorf@lcounty.com
Web Applications Developer
http://www.lcounty.com - CHECK OUT THE NEW LOOK!
Licking County, Ohio, USA
740-349-3631
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net