Bug #13947 Updated: mysql_free_result giving error for valid $result
ID: 13947
Updated by: sniper
Reported By: rohan.hawthorne@nt.gov.au
Old Status: Open
Status: Bogus
Bug Type: MySQL related
Operating System: Red Hat Version 2.4
PHP Version: 4.0.4pl1
New Comment:
Submitted multiple times. Also, update your PHP to latest
release before sending any reports. And finally, read the
documentation about how to send useful bug reports before
even thinking of clicking the submit button.
http://bugs.php.net/how-to-report.php
Thank you.
--Jani
Previous Comments:
------------------------------------------------------------------------
[2001-11-05 22:35:38] rohan.hawthorne@nt.gov.au
Here is the code:
$SQL = "UPDATE tblAsset SET fldAssetId = 2, fldAssetCode = 'bc04495' WHERE fldAssetId
= 2";
$result = mysql_query("$SQL");
if (!$result) { echo("ERROR: " . mysql_error() . "$SQL"); }
mysql_free_result ($result);
Here is the error:
Warning: Supplied argument is not a valid MySQL result resource in
/var/www/html/itss/ProcessAsset.php on line 4
If an UPDATE doesn't produce a positive $result, why does the first error check (line 3) not
produce an error ?
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13947&edit=1
Thread (2 messages)