Select the database

@param   string  Database
@return  void
556389
protected function _select_db($database)
	{
		if ( ! mysql_select_db($database, $this->_connection))
		{
			// Unable to select database
			throw new \Database_Exception(mysql_error($this->_connection), mysql_errno($this->_connection));
		}

		static::$_current_databases[$this->_connection_id] = $database;
	}
1105836
public function selectDatabase($name)
    {
        $response = $this->client->request('GET', sprintf('/%s/', $name));

        if (404 === $response->getStatusCode()) {
            throw new Exception(sprintf('The database "%s" does not exist', $name));
        }

        return $this->wrapDatabase($name);
    }
1183728
public function select($cols = array('*'))
    {
        if (!is_array($cols)) {
            $cols = func_get_args();
        }
        return new Query("SELECT", $cols, $this->connectionName);
    }
1366503
public function delete()
    {
        $this->getContext()->invokeApiPost('DATABASES', [
            'action' => 'delete',
            'select0' => $this->getDatabaseName(),
        ]);
        $this->getContext()->getContextUser()->clearCache();
    }
629522
public function select($database)
    {
        $this->database = $database;

        $this->getDatabase($database)->select();

        return $this;
    }
1247366
public function select_database($database)
    {
        //        try{

        if ($this->pdo) {
            if ($this->pdo->exec('USE ' . $database) !== FALSE) {
                return true;
            }
        }
        //        }catch(\Exception $ex)
        //        {
        //            new Exception($this->getLastError());
        //        }
        return false;
    }
146978
public function delete(String $database = '*', Array $tables = NULL)
    {
        if( $database === '*' )
        {
            $this->deleteVisionsDirectory();
        }
        else
        {
            if( $tables === NULL )
            {
                $this->deleteVisionDirectory($database);
            }
            else
            {
                $this->deleteVisionFile($database, $tables);
            }
        }
    }
789727
public function addDatabase(Database $database)
    {
        if (isset($this->databases[$database->getName()])) {
            throw new DBALException("Database '{$database->getName()}' already exists");
        }

        $this->databases[$database->getName()] = $database;
    }
1366724
protected function useConfiguredDatabase()
    {
        try {
            $this->getDbConnection()->exec('USE `' . $this->getDbName() . '`');
        } catch (Exception $e) {
            throw new Exception("Could not connect to database " . $this->getDbName());
        }
    }
1029246
public function select()
    {
        $this->db->disconnect();

        $this->db->setDatabaseName($this->getName());

        return $this;
    }
1090756
public function selectDatabase($database)
    {
        $mysqli = $this->_mysqli();

        if(!$mysqli->select_db($database))
            throw new Exception($mysqli->error, $mysqli->errno);

        $this->_selectedDatabase = $database;

        return $this;
    }
961707
public function startDatabase($database)
    {
        assert($this->_platform instanceof SQLAnywherePlatform);
        $this->_execSql($this->_platform->getStartDatabaseSQL($database));
    }
640286
public function removeDatabase(Database $database)
    {
        if($this->getDatabases()->contains($database)) {
            $this->getDatabases()->remove($database);
        }
    }
562885
public static function _select(array $select=[]) :Query {

		// returns a Query object, to execute, or to complement with some more parameters
		return Database::query()
			->select($select)
			->from(self::tableName());

	}
548508
def select(table, key='default'):
    
    database = choice(__db[key + '.slave'])
    return database.select(table)
115831
private function selectDatabase($database)
    {
        if (!is_integer($database) || $database < 0) {
            throw new RedisConnectionException(
                "Can't select database '{$database}'. Should be a natural number."
            );
        }
        $this->connection->select($database);
    }
871770
public function setDatabase($database)
    {
        if (! $database instanceof MongoDB) {
            $database = $this->connection->getConnection()->{$database};
        }

        $this->database = $database;

        return $this;
    }