summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlsrv
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-02-22 15:05:47 +0100
committerAndrey Andreev <narf@bofh.bg>2012-02-22 15:05:47 +0100
commit11454e039fd82f2fd4ee2f186ad0317e3435f187 (patch)
tree473dd84e9d593768ea0f321d6371cb50b6997705 /system/database/drivers/sqlsrv
parent7a2412cfe7f7d8db3eb845542609c476c52efc3d (diff)
Add an optional database name parameter to db_select()
Diffstat (limited to 'system/database/drivers/sqlsrv')
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_driver.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php
index 6fd52ef70..390840094 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -122,12 +122,12 @@ class CI_DB_sqlsrv_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 = '')
{
- return $this->_execute('USE ' . $this->database);
+ return $this->_execute('USE '.($database == '' ? $this->database : $database));
}
// --------------------------------------------------------------------
@@ -608,4 +608,4 @@ class CI_DB_sqlsrv_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 */