Home  |  Linux  | Mysql  | PHP  | XML
From:Carol Walter Date:Tue Jun 16 14:57:17 2009
Subject:Postgres query failing, not enough info for debugging...
Hello,

I'm using PHP 5 and PostgreSQL 8.3.6. I have a query that is failing
and I don't know how to troubleshoot the problem. The error message
that it is giving is quite vague. The error message is as follows:


Warning: pg_query_params() [function.pg-query-params]: Query failed:
ERROR: syntax error at end of input at character 156 in /home/walterc/
ssl/PHP/km_input_test2c.php on line 631
ERROR: syntax error at end of input at character 156

The query that is failing looks like this...

$pg_pres_ins6 = pg_query_params("INSERT INTO \"brdgMediaCallsEvents
\" (\"mediumId\", \"eventId\", rank) VALUES
((currval('\"tblMedia_mediumId_seq\"'),
(currval('\"tblCallsEvents_eventId_seq\"'), $1)", array($ev_rank));
echo pg_last_error($pg_connection);

It's quite possible this is something very simple and I'm just not
seeing it. I commented out this query because I thought perhaps it
was failing because it was the last query in the program. The
previous query did not fail when it became the last one.

Thanks in advance for your help.

Carol
Navigate in group php.db at sever news.php.net
Previous Next


Your recent visits
Multiple result sets using PDO and PostgreSQL.
Re: [PHP-DB] Storing Images #2
ocilogon core dump on Solaris 10 X86 with php-5.2.9 and Oracle 10g



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants