note 54294 deleted from function.pg-query by mazzanet
| From: | mazzanet@php.net | Date: | Wed, 29 Jun 2005 22:31:48 +0000 |
| Subject: | note 54294 deleted from function.pg-query by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91163@lists.php.net to get a copy of this message | ||
Note Submitter: salblomo at hotmail dot com
----
Just a helper. When calling this function inside of a web page and the function fails, you may get
a message on your web page saying something like...
"Warning: pg_query(): Query failed: blah, blah, blah".
I'm not sure if this was intentional or not. But I found it quite annoying since I would
rather handle the failed query myself.
Anyways, if you compiled php from source (I'm using v 5.0.4), go to file pgsql.c, line 1080 and
comment it out. Rebuild php, reinstall and it shouldn't report an error on your web page if
the query should fail. Again I'm not saying this is a bug but it worked for me.
Line 1080 should look like ...
PHP_PQ_ERROR("Query failed: %s", pgsql);
Do this...
// PHP_PQ_ERROR("Query failed: %s", pgsql);