Re: if else question

From: Date: Sun, 07 Apr 2002 22:37:20 +0000
Subject: Re: if else question
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18300@lists.php.net to get a copy of this message
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.. Later, Bob "Jennifer Downey" <jendowney@attbi.com> wrote in message news:20020407222912.66785.qmail@pb1.pair.com... > 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 > >

« previous php.db (#18300) next »