note 94623 deleted from function.pg-query-params by danbrown

From: Date: Sun, 15 Nov 2009 15:35:48 +0000
Subject: note 94623 deleted from function.pg-query-params by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162930@lists.php.net to get a copy of this message
Note Submitter: olivier dot berger at it-sudparis dot eu ---- In addition to the note #71912 by "dt309 at f2s dot com", the ANY queries for string values need to be encoded with double quotes, something like : <?php //... $query = 'SELECT * FROM table1 WHERE col1 = ANY ($1)'; $result = pg_query_params($query, array('{"foo", "bar"}')); ?> (see examples of other such syntax in chapter "8.14. Arrays" of prostgres docs). So the valuelist construction with implode must be adapted to add the necessary double quotes.

« previous php.notes (#162930) next »