Pyh.conf’25: a new PHP conference for the Russian-speaking community

Voting

: four plus zero?
(Example: nine)

The Note You're Voting On

dhammari at q90 dot com
16 years ago
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

<< Back to user notes page

To Top