Strange bahavior with mysql_fetch_array($result)

From: Date: Fri, 21 Nov 2003 01:54:26 +0000
Subject: Strange bahavior with mysql_fetch_array($result)
Groups: php.db 
Request: Send a blank email to php-db+get-31681@lists.php.net to get a copy of this message
I am searching a table and have the following php code with my comments: $result = mysql_query($query); print "The result == $result"; // it returns The result == Resource id #2" if (!mysql_fetch_array($result)) { ... } else { while ($row = mysql_fetch_array($result)) { ... } } Neither the if nor the while get executed. Can you make any suggestions? Obviously I'm new to this. Evan

« previous php.db (#31681) next »