#34233 [Opn]: PDO ignores parameters when surrounded by closed quotes

From: Date: Wed, 24 Aug 2005 11:34:23 +0000
Subject: #34233 [Opn]: PDO ignores parameters when surrounded by closed quotes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83936@lists.php.net to get a copy of this message
ID: 34233 User updated by: php at sagi dot org -Summary: PDO misquotes/miscasts bool(false) Reported By: php at sagi dot org Status: Open Bug Type: PDO related Operating System: Linux PHP Version: 5.1.0RC1 New Comment: Fixing subject, the bug system somehow changed it to a subject of a previous bug that I've reported. Previous Comments: ------------------------------------------------------------------------ [2005-08-24 13:23:57] php at sagi dot org 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 this bug report at http://bugs.php.net/?id=34233&edit=1

« previous php.bugs (#83936) next »