summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql/mssql_driver.php
diff options
context:
space:
mode:
authorJamie Rumbelow <jamie@jamierumbelow.net>2012-02-28 16:40:18 +0100
committerJamie Rumbelow <jamie@jamierumbelow.net>2012-02-28 16:40:18 +0100
commit576b47e9947d4f5bc25a3f72e3978a3d7f9ca1de (patch)
tree286194a87e7388970e3e546fabb0690e0a349342 /system/database/drivers/mssql/mssql_driver.php
parentae123e0b3d749a13d8820d0a6b773ca25b0ed380 (diff)
parent0aa8c60ae7eee0122c42ae17d42fd5471a575743 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/mssql/mssql_driver.php')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php21
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 b809241b4..52d5db653 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 */