note 62668 added to function.pg-prepare

From: Date: Mon, 06 Mar 2006 23:11:06 +0000
Subject: note 62668 added to function.pg-prepare
Groups: php.notes 
Request: Send a blank email to php-notes+get-104944@lists.php.net to get a copy of this message
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. ---- Server IP: 66.163.161.117 Probable Submitter: 63.87.162.2 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.pg-prepare.php Edit -- http://master.php.net/note/edit/62668 Del: integrated -- http://master.php.net/note/delete/62668/integrated Del: useless -- http://master.php.net/note/delete/62668/useless Del: bad code -- http://master.php.net/note/delete/62668/bad+code Del: spam -- http://master.php.net/note/delete/62668/spam Del: non-english -- http://master.php.net/note/delete/62668/non-english Del: in docs -- http://master.php.net/note/delete/62668/in+docs Del: other reasons-- http://master.php.net/note/delete/62668 Reject -- http://master.php.net/note/reject/62668 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#104944) next »