Re: If select query doesn't net any results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux