From: php at sagi dot org Operating system: Linux PHP version: 5.1.0RC1 PHP Bug Type: PDO related Bug description: PDO misquotes/miscasts bool(false)
Description: ------------ Running PHP5.1.0RC1, postgresql 8 server with v7.4.7 client libs (pretty sure native prepared statements are disabled). When trying to execute this query: $stmt = $db->prepare("SELECT ('0' || :param || '0')"); $stmt->execute(array(':param' => 123)); PDO actually executes this SQL statement: SELECT ('0' || :param || '0'), without replacing :param. It seems like the parser thinks the whole "0' || :param || '0" part is quoted, though its not. The query "SELECT (0 || :param || 0)" works as expected. -- Edit bug report at http://bugs.php.net/?id=34233&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34233&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34233&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34233&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34233&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34233&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34233&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34233&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34233&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34233&r=support Expected behavior: http://bugs.php.net/fix.php?id=34233&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34233&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34233&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34233&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34233&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34233&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34233&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34233&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34233&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34233&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34233&r=mysqlcfg