Jump to content

No results found - simple help


Mr Chris

Recommended Posts

Hi,

 

In the below query:

 

<? 
  $SQL = "SELECT * from xxxx";
  $result = mysql_query($SQL) OR die(mysql_error()); 
    while ($row = mysql_fetch_assoc($result)){ 
      echo 'Blah, Blah Blah';
    }
     if (!$result){ 
       echo 'No results';
    } 
?>

 

If I find no results I want the no results message outputted.  But It does not work.  Can anyone explain why?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/68405-no-results-found-simple-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.