php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13947 mysql_free_result giving error for valid $result
Submitted: 2001-11-05 22:35 UTC Modified: 2001-11-07 19:03 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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 - 14 = ?
Subscribe to this entry?

 
 [2001-11-05 22:35 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 4

If an UPDATE doesn't produce a positive $result, why does the first error check (line 3) not produce an error ?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-07 19:03 UTC] sniper@php.net
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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC