--- /var/tmp/drupal-4.6.3/includes/database.mysql.inc 2005-08-14 11:58:26.000000000 +0200
+++ includes/database.mysql.inc 2005-08-23 14:49:01.000000000 +0200
@@ -56,14 +56,14 @@
}
if ($debug) {
- print '
query: '. $query .'
error:'. mysql_error() .'
';
+ print 'query: '. $query .'
error:'. mysql_error($active_db) .'
';
}
- if (!mysql_errno()) {
+ if (!mysql_errno($active_db)) {
return $result;
}
else {
- trigger_error(mysql_error() ."\nquery: ". htmlspecialchars($query), E_USER_ERROR);
+ trigger_error(mysql_error($active_db) ."\nquery: ". htmlspecialchars($query), E_USER_ERROR);
return FALSE;
}
}
@@ -136,7 +136,8 @@
* Determine whether the previous query caused an error.
*/
function db_error() {
- return mysql_errno();
+ global $active_db;
+ return mysql_errno($active_db);
}
/**