note 92097 added to pdostatement.bindparam
| From: | dhammari at q90 dot com | Date: | Wed, 08 Jul 2009 18:22:20 +0000 |
| Subject: | note 92097 added to pdostatement.bindparam | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158077@lists.php.net to get a copy of this message | ||
There seems to be some confusion about whether you can bind a single value to multiple identical
placeholders. For example:
$sql = "SELECT * FROM user WHERE is_admin = :myValue AND is_deleted = :myValue ";
$params = array("myValue" => "0");
Some users have reported that attempting to bind a single parameter to multiple placeholders yields
a parameter mismatch error in PHP version 5.2.0 and earlier. Starting with version 5.2.1, however,
this seems to work just fine.
For details, see bug report 40417:
http://bugs.php.net/bug.php?id=40417
----
Server IP: 209.41.74.194
Probable Submitter: 166.70.156.94
----
Manual Page -- http://www.php.net/manual/en/pdostatement.bindparam.php
Edit -- https://master.php.net/note/edit/92097
Del: integrated -- https://master.php.net/note/delete/92097/integrated
Del: useless -- https://master.php.net/note/delete/92097/useless
Del: bad code -- https://master.php.net/note/delete/92097/bad+code
Del: spam -- https://master.php.net/note/delete/92097/spam
Del: non-english -- https://master.php.net/note/delete/92097/non-english
Del: in docs -- https://master.php.net/note/delete/92097/in+docs
Del: other reasons-- https://master.php.net/note/delete/92097
Reject -- https://master.php.net/note/reject/92097
Search -- https://master.php.net/manage/user-notes.php