Merging server feature from REL1_4
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 14 Jan 2005 13:03:34 +0000 (13:03 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 14 Jan 2005 13:03:34 +0000 (13:03 +0000)
includes/Database.php

index b30c54b..cf3228e 100644 (file)
@@ -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