note 54294 added to function.pg-query

From: Date: Wed, 29 Jun 2005 20:42:46 +0000
Subject: note 54294 added to function.pg-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-91159@lists.php.net to get a copy of this message
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); ---- Manual Page -- http://www.php.net/manual/en/function.pg-query.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54294 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54294&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54294&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54294&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54294&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54294&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54294&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54294&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#91159) next »