RE: [PHP-DB] if else question

From: Date: Sun, 07 Apr 2002 22:47:49 +0000
Subject: RE: [PHP-DB] if else question
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18301@lists.php.net to get a copy of this message
Hi Jenn, Since the function mysql_num_rows returns an integer, you can't just say if (mysql_num_rows($result)) ... Try to get the number of the rows and write an if statement according to that, or you can use something like while(mysql_fetch_array($result)) { ..... } Gurhan -----Original Message----- From: Jennifer Downey [mailto:jendowney@attbi.com] Sent: Sunday, April 07, 2002 6:29 PM To: php-db@lists.php.net Subject: [PHP-DB] if else question Hi all, Just wondering if something like this is valid. If not how can I make it valid? if (mysql_num_rows($result) and (mysql_num_rows($ret) == 0) Thanks Jennifer --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#18301) next »