db_is_active

Definition

db_is_active()
includes/database.inc, line 192

Description

Returns a boolean depending on the availability of the database.

Related topics

Namesort iconDescription
Database abstraction layerAllow the use of different database servers using the same code base.

Code

<?php
function db_is_active() {
  global $active_db;
  return !empty($active_db);
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.