Home » Database » DB » Bug #2368
Using getRow() with an mysql UPDATE command results in a fatal error
Details
| Submitted | 2004-09-21 22:28 UTC |
|---|---|
| From | sebastian at herbajet dot com |
| Assigned | danielc |
| Status | Bogus |
| Package | DB |
| PHP Version | 4.2.2 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-09-21 22:28 UTC] sebastian at herbajet dot com
Description:
------------
When i use getRow() with an mysql UPDATE command results
in a fatal error. This is of course not the right use of
the function but it shouldnt result in a PHP fatal error
Reproduce code:
---------------
$db_result = $this->content->db->query("UPDATE users SET firstname='$firstname', lastname='$lastname', email='$email', telephone='$telephone' WHERE id='$id'");
if(DB::isError($db_result))
die($db_result->getMessage());
Expected result:
----------------
the row in the database should get update or just return
false since i should use query insted?!
Actual result:
--------------
Fatal error: Call to a member function on a non-object
in /usr/share/php/PEAR/DB/common.php on line 765