|
Home
iRate! IceMelon IM Tutorials Headlines CoolSites PHP Functions |
|
Most Referenced Functions » google_pagerank() » preg_replace() » imagecreatefrompng() » site_pageranks() » imagepng() » imagedestroy() » imagestring() » imagecolorallocate() » htmlentities() » preg_match() » fopen() » header() » getimagesize() » preg_match_all() » session_start() » htmlspecialchars() » ob_start() » ob_flush() » strstr() » flush() » strpos() » setcookie() » str_replace() » array2vars() » nl2br() » preg_split() » ereg() » ereg_replace() » urlencode() » readgzfile() Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m. |
PHP Functions
Function: pg_set_error_verbosity (PHP 5) pg_set_error_verbosity -- Determines the verbosity of messages returned by pg_last_error() and pg_result_error() .Descriptionint pg_set_error_verbosity ( resource connection, int verbosity ) int pg_set_error_verbosity ( int verbosity )Determines the verbosity of messages returned by pg_last_error() and pg_result_error() . pg_set_error_verbosity() sets the verbosity mode, returning the connection's previous setting. In PGSQL_ERRORS_TERSE mode, returned messages include severity, primary text, and position only; this will normally fit on a single line. The default mode ( PGSQL_ERRORS_DEFAULT ) produces messages that include the above plus any detail, hint, or context fields (these may span multiple lines). The PGSQL_ERRORS_VERBOSE mode includes all available fields. Changing the verbosity does not affect the messages available from already-existing result objects, only subsequently-created ones. Parameters
connection PostgreSQL database connection resource. When connection is not present, the default connection is used. The default connection is the last connection made by pg_connect() or pg_pconnect() . verbosityThe required verbosity: PGSQL_ERRORS_TERSE , PGSQL_ERRORS_DEFAULT or PGSQL_ERRORS_VERBOSE . Return ValuesThe previous verbosity level: PGSQL_ERRORS_TERSE , PGSQL_ERRORS_DEFAULT or PGSQL_ERRORS_VERBOSE . Examples
Example 1. pg_set_error_verbosity() example
<?php
$dbconn = pg_connect("dbname=publisher") or die("Could not connect");
if (!pg_connection_busy($dbconn)) {
pg_send_query($dbconn, "select * from doesnotexist;");
}
pg_set_error_verbosity($dbconn, PGSQL_ERRORS_VERBOSE);
$res1 = pg_get_result($dbconn);
echo pg_result_error($res1);
?>
Related Function(s) |