#37832 [Opn->Bgs]: Crashes using $Db->exec instead of $Db->query
| From: | jakoch at web dot de | Date: | Sat, 17 Jun 2006 13:16:04 +0000 |
| Subject: | #37832 [Opn->Bgs]: Crashes using $Db->exec instead of $Db->query | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98439@lists.php.net to get a copy of this message | ||
ID: 37832
User updated by: jakoch at web dot de
Reported By: jakoch at web dot de
-Status: Open
+Status: Bogus
Bug Type: PDO related
Operating System: WinXP
PHP Version: 5.1.4
New Comment:
bogus, found error in exception handler.
Previous Comments:
------------------------------------------------------------------------
[2006-06-17 13:13:41] jakoch at web dot de
Description:
------------
this bug was found accidently using the wrong pdo command:
exec instead of query!
the use of exec crashes the apache.
an errormessage should be given, reporting of the wrong command use at
this position.
Reproduce code:
---------------
$table = "SELECT session_id FROM ". DB_PREFIX ."session ";
$where = "WHERE session_id='$session'";
FALSE:
$session_id = $Db->exec($table.$where);
RIGHT:
$session_id = $Db->query($table.$where);
Expected result:
----------------
throw out errormessage!
Actual result:
--------------
crash of apache!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37832&edit=1