6.x database.inc db_is_active()

Returns a boolean depending on the availability of the database.

Related topics

File

includes/database.inc, line 194
Wrapper for database interface code.

Code

function db_is_active() {
  global $active_db;
  return !empty($active_db);
}