note 54612 added to function.pg-last-error

From: Date: Sat, 09 Jul 2005 11:19:44 +0000
Subject: note 54612 added to function.pg-last-error
Groups: php.notes 
Request: Send a blank email to php-notes+get-91712@lists.php.net to get a copy of this message
We use the following code to check for pg function errors for postgres 7.4.x: $this->status = pg_result_status($this->conn ); ... if (($this->status == 5 or $this->status == 7)) { $this->error = 1; $this->error_msg = pg_last_error($this->conn); } As intimated in the docs, the result codes are somewhat mysterious. However these two integers appear to cover most of the error cases. ---- Manual Page -- http://www.php.net/manual/en/function.pg-last-error.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54612 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54612&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54612&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54612&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54612&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54612&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54612&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54612&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#91712) next »