Re: dealing with no record

From: Date: Mon, 05 Mar 2001 10:26:18 +0000
Subject: Re: dealing with no record
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42598@lists.php.net to get a copy of this message
"Jacky@lilst" 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? Hello, In the PHP Manual, section MySQL, there is a description of a function called mysql_num_rows()... Robert

« previous php.general (#42598) next »