On Tue, 6 Mar 2001 06:36, [EMAIL PROTECTED] wrote:
> > 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
$query="select name from foo";
$result= mysql_query($query);
if(mysql_num_rows($result) ==0)) {
redirect
}
else...
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]