note 62675 modified in function.pg-prepare by bjori
| From: | bjori@php.net | Date: | Tue, 07 Mar 2006 13:33:29 +0000 |
| Subject: | note 62675 modified in function.pg-prepare by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-104976@lists.php.net to get a copy of this message | ||
Note that if you are preparing a query with an in clause with a list of items, you will need to
prepare each item separately.
$result = pg_prepare($dbconn, "my_query", 'SELECT * FROM shops WHERE name
IN($1,$2,$3)');
$result = pg_execute($dbconn, "my_query", array("coffee", "beer",
"hard"));
This means that you can't just prepare a query with an arbitrary in() list.
--was--
Note that if you are preparing a query with an in clause with a list of items, you will need to
prepare each item separately.
$result = pg_prepare($dbconn, "my_query", 'SELECT * FROM shops WHERE name
IN($1,$2,$3)');
$result = pg_execute($dbconn, "my_query", array("coffee, beer, hard"));
This means that you can't just prepare a query with an arbitrary in() list.
http://php.net/manual/en/function.pg-prepare.php