PHP4 and MySQL

From: Date: Thu, 26 Oct 2000 09:06:37 +0000
Subject: PHP4 and MySQL
Groups: php.db 
Request: Send a blank email to php-db+get-3929@lists.php.net to get a copy of this message
Hello, I'm new to this list, and it might have been asked before (sorry). I have following problem: When I have PHP code like this: $rs_result=mysql_db_query($db,"SELECT * FROM XX WHERE something=$yy",$connection); while($row_result=mysql_fetch_array($rs_result)) { do_something(); } I always get a warning from PHP4, which says:"Supplied argument is not a valid MySQL result resource in this_script.php on line 2", when the query returns _no_ rows. Funny thing is that this worked with PHP3 without any problems. Is this a bug or have there been modifications in behavior of those mysql functions in PHP4? Thanks Robert Vetter

« previous php.db (#3929) next »