Re: Re: Broken IF behavior? (Changing the branch changes the evaluation)
| From: | Matt Neimeyer | Date: | Wed, 29 Jul 2009 15:47:15 +0000 |
| Subject: | Re: Re: Broken IF behavior? (Changing the branch changes the evaluation) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296006@lists.php.net to get a copy of this message | ||
>> $Ret = mysql_fetch_array($result); if(!$Ret) { } else { return $Ret; }
> I'm assuming that you are calling my_fetch_array() in a loop of some
> sort and so at some point there are no more records in the result.
Oh... Um... Yeah... Well... <headdesk>
So... Checking the docs... "Returns an array of strings that
corresponds to the fetched row, or FALSE if there are no more rows."
Is there a way to differentiate between a FALSE for no more rows and an error?
Matt