multiple params in pg_prepare

From: Date: Tue, 17 Jul 2007 00:42:53 +0000
Subject: multiple params in pg_prepare
Groups: php.db 
Request: Send a blank email to php-db+get-43794@lists.php.net to get a copy of this message
Hi, I'm trying to set up a prepared sql statement with 3 parameters and then execute with array of 3 elements (this is to a postgresql database with postgis): $result = pg_prepare($dbconn, "my_query", 'INSERT INTO gtest VALUES ($1, GeomFromText(\'POINT($2 $3)\', 4326))'); $result = pg_execute($dbconn, "my_query", array("phptest", "23", "24")); But when I ran it, it gave me this error: Warning: pg_execute(): Query failed: ERROR: bind message supplies 3 parameters, but prepared statement "my_query" requires 1 in /home/dlamoris/phptest.php on line 15 Am I missing something? Thanks, Doris

« previous php.db (#43794) next »