You are here

function db_error in Drupal 6

Same name in this branch
  1. 6 includes/database.mysqli.inc \db_error()
  2. 6 includes/database.mysql.inc \db_error()
  3. 6 includes/database.pgsql.inc \db_error()
Same name and namespace in other branches
  1. 4 includes/database.mysqli.inc \db_error()
  2. 4 includes/database.mysql.inc \db_error()
  3. 4 includes/database.pgsql.inc \db_error()
  4. 5 includes/database.mysqli.inc \db_error()
  5. 5 includes/database.mysql.inc \db_error()
  6. 5 includes/database.pgsql.inc \db_error()

Determine whether the previous query caused an error.

Related topics

File

includes/database.mysql.inc, line 196
Database interface code for MySQL database servers.

Code

function db_error() {
  global $active_db;
  return mysql_errno($active_db);
}