You are here

function _demo_get_database in Demonstration site (Sandbox / Snapshot) 5

Same name and namespace in other branches
  1. 8 demo.module \_demo_get_database()
  2. 6 database_mysql_dump.inc \_demo_get_database()
  3. 7 database_mysql_dump.inc \_demo_get_database()

Returns the name of the active database.

1 call to _demo_get_database()
demo_dump_db in ./database_mysql_dump.inc
Dump active database.

File

./database_mysql_dump.inc, line 51

Code

function _demo_get_database() {
  $database = array_keys(db_fetch_array(db_query('SHOW TABLES')));
  $database = preg_replace('/^Tables_in_/', '', $database[0]);
  return $database;
}