You can use mysql_result_rows() to check whether any rows were returned;
something like:
<?
if(mysql_result_rows($result) > 0){
while ($row = mysql_fetch_array($result)) {
//Do stuff with result rows here
}
}else{
echo "Sorry your search returned Zero Rows";
}
?>
HTH,
-Andy
> -----Original Message-----
> From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 06, 2002 10:17 AM
> To: [EMAIL PROTECTED]
> Subject: Search results
>
>
> I have done a search page based on a specific column name, but in some
> columns there is no results to be returned..
>
> What I would like to do is display an error message stating that
> there is no
> results .. something like "Sorry your search returned Zero Rows"
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php