dealing with no record
| From: | Jacky@lilst | Date: | Mon, 05 Mar 2001 20:06:14 +0000 |
| Subject: | dealing with no record | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42583@lists.php.net to get a copy of this message | ||
People
If I run a sniplet like this:
**********************
$query="select name from foo";
$result= mysql_query($query);
while($row = mysql_fetch_row($result))
stuffssss.......to display record found....
...
***********************
what am I suppose to do if I also want the code to be able to deal with the case that no record
found and redirect user to other page?
Jack
jacky@activelifestyle.com
"There is nothing more rewarding than reaching the goal you set for yourself"