diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-02-24 10:52:16 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-02-24 10:52:16 +0100 |
commit | a19fb3eea3591f7ee38fec1c64ded0ea0e2f5885 (patch) | |
tree | af12b10da8a580df4811a7291897b093f4b7f5bd /system/database/drivers/mssql | |
parent | 15e0fb578dd70438873e6f70265ac09eea5dfdd7 (diff) | |
parent | 5148029aaf204fb3e7e4f24a794bee781d0c218b (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/drivers/mssql')
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index c273323d8..4c26dc465 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -109,13 +109,25 @@ class CI_DB_mssql_driver extends CI_DB { /** * Select the database * + * @param string database name * @return bool */ - public function db_select() + public function db_select($database = '') { + if ($database === '') + { + $database = $this->database; + } + // Note: The brackets are required in the event that the DB name // contains reserved characters - return @mssql_select_db('['.$this->database.']', $this->conn_id); + if (@mssql_select_db('['.$database.']', $this->conn_id)) + { + $this->database = $database; + return TRUE; + } + + return FALSE; } // -------------------------------------------------------------------- |