diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-02-27 22:56:39 +0100 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-02-27 22:56:39 +0100 |
commit | 2d87f8458f30057af466cd4b3b5edcf568861691 (patch) | |
tree | 37b21f5b14119445a4cf1b3fd338e48f82ac0cdf /system/database/drivers/mssql/mssql_driver.php | |
parent | 03f8ec00afb0da44c2191c4248832a37f7bd3c1f (diff) | |
parent | d8a0aed00b2174af5cac96ecada10ea392e19120 (diff) |
Merge upstream
Diffstat (limited to 'system/database/drivers/mssql/mssql_driver.php')
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 2a1098932..25a32f364 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -114,14 +114,25 @@ class CI_DB_mssql_driver extends CI_DB { /** * Select the database * - * @access private called by the base class - * @return resource + * @param string database name + * @return bool */ - 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; } // -------------------------------------------------------------------- @@ -676,4 +687,4 @@ class CI_DB_mssql_driver extends CI_DB { /* End of file mssql_driver.php */ -/* Location: ./system/database/drivers/mssql/mssql_driver.php */
\ No newline at end of file +/* Location: ./system/database/drivers/mssql/mssql_driver.php */ |