php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13945 mysql_free_result giving error for valid $result
Submitted: 2001-11-05 22:34 UTC Modified: 2001-11-06 09:57 UTC
From: rohan dot hawthorne at nt dot gov dot au Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.0.4pl1 OS: Red Hat Version 2.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rohan dot hawthorne at nt dot gov dot au
New email:
PHP Version: OS:

 

 [2001-11-05 22:34 UTC] rohan dot hawthorne at nt dot gov dot 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 3

If an UPDATE doesn't produce a positive $result, why does the first error check produce an error ?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-06 09:57 UTC] jpm@php.net
User submitted bug several times by accident (wasn't this fixed ?)

Not a bug -> bogus

--Joao
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 20:01:30 2025 UTC