Re: If select query doesn't net any results

From: Date: Thu, 09 Jan 2003 18:03:40 +0000
Subject: Re: If select query doesn't net any results
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-24712@lists.php.net to get a copy of this message
> I would like to created an if statement that only occurs if the query gets a result. If there > are > no records that meet the query conditionals and my array ends up with null, I do not want my if > > statement to take place. > Is this easy enough to do? Any help would be great. if( mysql_num_rows( $result ) > 0 ) { // Records were returned // Do something here // } Chris

« previous php.db (#24712) next »