★ wanayoo — archive 1999 http://www.php.net/manual/function.pg-errormessage.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to PostgreSQL
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
PostgreSQL
* pg_close
* pg_cmdtuples
* pg_connect
* pg_dbname
* pg_errormessage
* pg_exec
* pg_fetch_array
* pg_fetch_object
* pg_fetch_row
* pg_fieldisnull
* pg_fieldname
* pg_fieldnum
* pg_fieldprtlen
* pg_fieldsize
* pg_fieldtype
* pg_freeresult
* pg_getlastoid
* pg_host
* pg_loclose
* pg_locreate
* pg_loexport
* pg_loimport
* pg_loopen
* pg_loread
* pg_loreadall
* pg_lounlink
* pg_lowrite
* pg_numfields
* pg_numrows
* pg_options
* pg_pconnect
* pg_port
* pg_result
* pg_trace
* pg_tty
* pg_untrace
Manual: pg_errormessage
View the source code for this pageSearch the site



Previous page
 pg_dbname
 Updated
Sat, 12 Aug 2000
pg_exec 
Next page


pg_errormessage

(PHP3 , PHP4 )

pg_errormessage -- Get the error message string

Description

string pg_errormessage (int connection)

Returns a string containing the error message, false on failure. Details about the error probably cannot be retrieved using the pg_errormessage() function if an error occured on the last database action for which a valid connection exists, this function will return a string containing the error message generated by the backend server.


User Contributed Notes: pg_errormessage


f.ermini@telemaco.it
26-Jan-1999 04:07
I would add that this function is useful particularly when used in combination with the "@" prefix, that turns off php's usual error reporting. Otherways, the user will see the error message without need of this functions (and without the fancy formatting that one could provide with a clever use of this function ;-D). Moreover, the text of this entry is not quite clear (maybe is a problem of language? I'm not a natural english-speaker too) but I may guess it means that this function won't work if the error has cause the connection to the DB to be closed.


ceo@l-i-e.com
16-Sep-1999 12:08
The most common example of an invalid connection is when pg_connect fails, and then pg_errormessage has nothing in it.



 About Notes


Previous page
 pg_dbname
 Updated
Sat, 12 Aug 2000
pg_exec 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.