public function select_database($database) {

        // if no active connection exists, return false
        if (!$this->_connected()) return false;

        // update the value in the credentials
        $this->credentials['database'] = $database;

        // select the database
        return mysqli_select_db($this->connection, $database);

    }
public function select_database($database) {

        // if no active connection exists, return false
        if (!$this->_connected()) return false;

        // update the value in the credentials
        $this->credentials['database'] = $database;

        // select the database
        return mysqli_select_db($this->connection, $database);

    }
public function select_database ( $ database ) { // if no active connection exists, return false if ( ! $ this -> _connected ( ) ) return false ; // update the value in the credentials $ this -> credentials [ 'database' ] = $ database ; // select the database return mysqli_select_db ( $ this -> connection , $ database ) ; }
Selects the default database for queries.

<code>
// set the default database for queries
$db->select_database('database_name');
</code>

@param  string  $database   Name of database to select as the default database for queries.

@since 2.9.4

@return boolean     Returns TRUE on success or FALSE on failure.
Selects the default database for queries .