\$res==NULL
";
exit();
}
string pg_result_error ( resource result):
Returns the error message associated with result resource.
string pg_last_error ( [resource connection]):
Returns the last error message for given connection.
Error messages may be overwritten by internal PostgreSQL(libpq)
function calls. Hence this may not return appropriate error message, if
multiple errors are occured inside a PostgreSQL module function.
Use pg_result_error(), pg_result_status() and pg_connection_status()
for better error handling.
string pg_last_notice ( resource connection):
Returns the last notice message from the PostgreSQL server specified
by connection. The PostgreSQL server sends notice messages in several
cases, e.g. if the transactions cannot be continued.
With pg_last_notice(), you can avoid issuing useless queries, by
checking whether the notice is related to the transaction or not.
Example: