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:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 6:29 PM To: [EMAIL PROTECTED] 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php