PHP 4.0 Bug #5529: Supplied argument is not a valid MySQL result resource

From: Date: Wed, 12 Jul 2000 12:38:36 +0000
Subject: PHP 4.0 Bug #5529: Supplied argument is not a valid MySQL result resource
Groups: php.dev 
Request: Send a blank email to php-dev+get-24183@lists.php.net to get a copy of this message
From: jagas@computerconsultant.net Operating system: Windows NT4 PHP version: 4.0 Release Candidate 2 PHP Bug Type: MySQL related Bug description: Supplied argument is not a valid MySQL result resource if ($dbh = mysql_connect('localhost','root','')) { $strSQL = "select authorsname,bodytext from stories where id = $storyid"; mysql_select_db('mydb'); $stmt = mysql_query($strSQL, $dbh); $row = mysql_fetch_array($stmt); } Compiled with MySQL I get an error when I call "$row = mysql_fetch_array($stmt)" . The error is: Supplied argument is not a valid MySQL result resource in .... on line 9. This function worked perfectly in PHP 3.

« previous php.dev (#24183) next »