From 59717e516156876c11e6e55131202d1b6ff1a526 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 14 Jan 2005 13:03:34 +0000 Subject: [PATCH] Merging server feature from REL1_4 --- includes/Database.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/Database.php b/includes/Database.php index b30c54bdd9..cf3228e8dc 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -540,12 +540,15 @@ class Database { */ function lastError() { if ( $this->mConn ) { - return mysql_error( $this->mConn ); + $error = mysql_error( $this->mConn ); } else { - return mysql_error(); + $error = mysql_error(); } - } - + if( $error ) { + $error .= ' (' . $this->mServer . ')'; + } + return $error; + } /** * Get the number of rows affected by the last write query * See mysql_affected_rows() for more details -- 2.20.1