summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlsrv
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-02-24 10:53:08 +0100
committerAndrey Andreev <narf@bofh.bg>2012-02-24 10:53:08 +0100
commit5ac6999c87cbca07aa2b0bfa972bac218600b404 (patch)
tree40fd9d5a78d8caf9f5dae963d543978ac679c0ba /system/database/drivers/sqlsrv
parent6f6704f3283a7b663f1598bc6013e6658d8d269b (diff)
parent5148029aaf204fb3e7e4f24a794bee781d0c218b (diff)
Merge upstream branch
Diffstat (limited to 'system/database/drivers/sqlsrv')
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php25
1 files changed, 22 insertions, 3 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php
index 0c24ef38f..9d61afc46 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -118,11 +118,23 @@ class CI_DB_sqlsrv_driver extends CI_DB {
/**
* Select the database
*
- * @return resource
+ * @param string database name
+ * @return bool
*/
- public function db_select()
+ public function db_select($database = '')
{
- return $this->_execute('USE ' . $this->database);
+ if ($database === '')
+ {
+ $database = $this->database;
+ }
+
+ if ($this->_execute('USE '.$database))
+ {
+ $this->database = $database;
+ return TRUE;
+ }
+
+ return FALSE;
}
// --------------------------------------------------------------------
@@ -564,5 +576,12 @@ class CI_DB_sqlsrv_driver extends CI_DB {
}
+<<<<<<< HEAD
/* End of file sqlsrv_driver.php */
/* Location: ./system/database/drivers/sqlsrv/sqlsrv_driver.php */
+=======
+
+
+/* End of file mssql_driver.php */
+/* Location: ./system/database/drivers/mssql/mssql_driver.php */
+>>>>>>> upstream/develop