Home » Database » DB » Bug #6043
query
Details
| Submitted | 2005-11-23 11:15 UTC |
|---|---|
| From | andregoncalo dot bras at gmail dot com |
| Assigned | danielc |
| Status | Bogus |
| Package | DB |
| PHP Version | Irrelevant |
| OS | windows |
| Roadmaps | (Not assigned) |
Comments
[2005-11-23 11:15 UTC] andregoncalo dot bras at gmail dot com
Description:
------------
When i run the query method on a update statement, and suppose that return error, the method is returning me an DB_result Object, instead of Db_Error.
Test script:
---------------
$sql = "updte eds_schedules set sch_description = '" . $_POST['description'] . "'," .
" sch_shift = '" . $_POST['shift'] . "'" .
" where sch_id = " . Misc::escapeInteger($_POST['sch_id']);
$query = $GLOBALS["db_api"]->dbh->query($sql);
print_r($query);
if (PEAR::isError($query))
$query = $GLOBALS["db_api"]->dbh->rollback();
else
$query = $GLOBALS["db_api"]->dbh->commit();
Expected result:
----------------
the $query variable should be an DB_Error object.
Actual result:
--------------
the $query variable is a DB_Result object.