diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-02-22 15:05:47 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-02-22 15:05:47 +0100 |
commit | 11454e039fd82f2fd4ee2f186ad0317e3435f187 (patch) | |
tree | 473dd84e9d593768ea0f321d6371cb50b6997705 /system/database/drivers/sqlsrv/sqlsrv_driver.php | |
parent | 7a2412cfe7f7d8db3eb845542609c476c52efc3d (diff) |
Add an optional database name parameter to db_select()
Diffstat (limited to 'system/database/drivers/sqlsrv/sqlsrv_driver.php')
-rw-r--r-- | system/database/drivers/sqlsrv/sqlsrv_driver.php | 10 |
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 */ |