I've always done it like this:
$count = mysql_num_rows( $result );
if( $count == 0 ) then doomething();
But there may be a better way..
In yours it appears you are testing for anything in mysql_num_rows($result)
and a value of 0 in mysql_num_rows($ret). I may be misundertanding you. Do
you mean to test for the value of both to be 0? If that's the case, I was
under the impression that it would have to be if( $foo == 0 AND $bar == 0 )
then doSomething(); but I could be wrong..
"Jennifer Downey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
> Just wondering if something like this is valid. If not how can I make it
> if (mysql_num_rows($result) and (mysql_num_rows($ret) == 0)
> 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