Edit report at http://bugs.php.net/bug.php?id=54258&edit=1

 ID:                 54258
 Updated by:         u...@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

Reply via email to