note 60429 added to function.pdostatement-execute

From: Date: Fri, 06 Jan 2006 18:42:32 +0000
Subject: note 60429 added to function.pdostatement-execute
Groups: php.notes 
Request: Send a blank email to php-notes+get-101315@lists.php.net to get a copy of this message
As of PHP 5.0.4, you cannot use the SQL IN operator with prepared statements. Documentation of restrictions with prepared statements and / or standard method of using the IN operator in prepared statements are not present as of 6 Jan 2006. I'm holding off filing a bug report for this until I can get some commentary. Example: $sql = 'SELECT * FROM users WHERE users.state IN (:state)'; $values = array(':state' => implode(',', array('IN','LA','NC')); $statement = $dbh->prepare($sql); $statement->execute($values); ---- Manual Page -- http://www.php.net/manual/en/function.pdostatement-execute.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+60429 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60429&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60429&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60429&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60429&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60429&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60429&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60429&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+60429&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#101315) next »