PHP4 and mysql_fetch_array() - one more try

From: Date: Wed, 01 Nov 2000 08:35:07 +0000
Subject: PHP4 and mysql_fetch_array() - one more try
Groups: php.db 
Request: Send a blank email to php-db+get-4085@lists.php.net to get a copy of this message
Hello, I have posted once regarding following problem, but didn't get answer. Perhaps this time? 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 above_script.php on line 3" - this is the line with mysql_fetch_array() function call.This happens _only_ when the query in the first line 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 (#4085) next »