Bug #54258 [Opn->Fbk]: MySQL: Silent ignorance of binds inside comments causes other to be wrong bound
| From: | uw@php.net | Date: | Tue, 10 May 2011 07:56:54 +0000 |
| Subject: | Bug #54258 [Opn->Fbk]: MySQL: Silent ignorance of binds inside comments causes other to be wrong bound | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160636@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54258&edit=1
ID: 54258
Updated by: uw@php.net
Reported by: an0nym at narod dot ru
Summary: MySQL: Silent ignorance of binds inside comments
causes other to be wrong bound
-Status: Open
+Status: Feedback
Type: Bug
Package: PDO related
Operating System: Linux
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Can't reproduce. Please, provide full example including connect, create
table, error handling and so forth.
Previous Comments:
------------------------------------------------------------------------
[2011-03-15 16:30:52] an0nym at narod dot ru
Description:
------------
See test script.
Test script:
---------------
$statement = $DB->prepare("UPDATE t SET /*field1 = :field1, */field2 =
:field2");
$field1 = 1;
$field2 = 2;
$statement->bindParam(":field1", $field1, PDO::PARAM_INT);
$statement->bindParam(":field2", $field2, PDO::PARAM_INT);
$statement->execute();
Expected result:
----------------
Query "UPDATE t SET /*field1 = 1, */field2 = 2" or error message like
"wrong param count".
Actual result:
--------------
Silently running query "UPDATE t SET /*field1 = ?, */field2 = 1".
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54258&edit=1