From: Tim Starling Date: Fri, 14 Jan 2005 13:03:34 +0000 (+0000) Subject: Merging server feature from REL1_4 X-Git-Tag: 1.5.0alpha1~944 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=59717e516156876c11e6e55131202d1b6ff1a526;p=lhc%2Fweb%2Fwiklou.git Merging server feature from REL1_4 --- 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