RE: [PHP-DB] Search results

From: Date: Wed, 06 Feb 2002 20:19:41 +0000
Subject: RE: [PHP-DB] Search results
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-16578@lists.php.net to get a copy of this message
On Wed, 6 Feb 2002, Todd Williamsen wrote: Please keep discussion on the list. > Doesn't execute the $msg variable. And it doesn't return any results: Have you checked that your query does indeed return results? > I tried this: > > <? > if ($result == 0) { > echo "$msg"; > } > else { > echo "$contact_list"; > } > ?> > But that returns the $msg variable even if there is results $result as defined in your code (see manual on mysql_query() for full details) will be FALSE if your query does not get executed correctly. If your query executes correctly $result will contain a link identifier. However that doesn't necessarily mean that your query returned any *results*. Insert some echos in your while loop to see whether you have any results. -- Jason Wong

« previous php.db (#16578) next »