function _demo_get_database in Demonstration site (Sandbox / Snapshot) 7
Same name and namespace in other branches
- 8 demo.module \_demo_get_database()
- 5 database_mysql_dump.inc \_demo_get_database()
- 6 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 94
Code
function _demo_get_database() {
$database = array_keys(db_query('SHOW TABLES')
->fetchAssoc());
$database = preg_replace('/^Tables_in_/i', '', $database[0]);
return $database;
}