db_set_active

Versions
4.6 – 6
db_set_active($name = 'default')
7
db_set_active($key = 'default')

Sets a new active database.

Parameters

$key The key in the $databases array to set as the default database.

Return value

s The key of the formerly active database.

Related topics

Code

includes/database/database.inc, line 2205

<?php
function db_set_active($key = 'default') {
  return Database::setActiveConnection($key);
}
?>
Login or register to post comments
 
 

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.