From d3d180482fb49a5a6b28459e596df256580281e2 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Fri, 21 Jul 2006 19:34:45 +0000 Subject: [PATCH] Better lastErrno, from a patch on bug #6732 --- includes/DatabasePostgres.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index eba6cb1504..2b23fe0ba5 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -309,7 +309,9 @@ class DatabasePostgres extends Database { return "No database connection"; } } - function lastErrno() { return 1; } + function lastErrno() { + return pg_last_error() ? 1 : 0; + } function affectedRows() { return pg_affected_rows( $this->mLastResult ); -- 2.20.1