note 62668 rejected from function.pg-prepare by bjori
| From: | bjori@php.net | Date: | Tue, 07 Mar 2006 01:43:01 +0000 |
| Subject: | note 62668 rejected from function.pg-prepare by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-104951@lists.php.net to get a copy of this message | ||
Note Submitter: scott dot marlowe at gmail dot com
----
mdv at inyourpocket dot com
No, you can't do it that way, because each argument you want to feed needs to be separated.
You need to prepare your query properly:
$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"));
You have three arguments, you need three entries in your array.