Edit report at http://bugs.php.net/bug.php?id=54385&edit=1
ID: 54385
User updated by: four dot zero dot one dot un dot authorized at gmail
dot com
Reported by: four dot zero dot one dot un dot authorized at gmail
dot com
Summary: Mysqli_stmt->get_result() gives no error on failure
Status: Open
Type: Feature/Change Request
Package: MySQLi related
Operating System: ms
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Actually, my bad. You can close this. I just found that the error
"2014 Commands out of sync; you can't run this command now" is already
stored in the main Mysqli object error properties after running the code
example. This works.
Previous Comments:
------------------------------------------------------------------------
[2011-03-25 23:28:03] four dot zero dot one dot un dot authorized at
gmail dot com
Description:
------------
Though mysqli_stmt->get_result() returns false on failure as expected,
it doesn't also generate an error on failure. Can warning-level errors
be added to help explain when/why a get fails?
Thanks,
401
Test script:
---------------
$m = new Mysqli();
$s = $m->prepare("SELECT * FROM test where(id = ?)");
$v = 1;
$s->bind_param('i', $v);
$s->execute();
$s->store_result(); // cause of get_result's failure
$r = $s->get_result();
Expected result:
----------------
Warning-level error on get_result() line 9 explaining why results failed
to return from method call, or at the very least a warning stating a
failure of some kind occurred.
Actual result:
--------------
No warning generated.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54385&edit=1