diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-02-28 13:48:55 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-02-28 13:48:55 +0100 |
commit | 575bbfe97e4f0e3ad88558454fb2c87d372a7651 (patch) | |
tree | eec271f209f8a7539b3b519be3a68e067f24562a /system/database/drivers/sqlsrv/sqlsrv_driver.php | |
parent | d33e24c2a649420d420ad9b11efb1bbf2421114c (diff) | |
parent | 0aa8c60ae7eee0122c42ae17d42fd5471a575743 (diff) |
Merge remote-tracking branch 'upstream/develop' into develop-db-sqlite
Diffstat (limited to 'system/database/drivers/sqlsrv/sqlsrv_driver.php')
-rw-r--r-- | system/database/drivers/sqlsrv/sqlsrv_driver.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 6fd52ef70..9c50209ec 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -122,12 +122,23 @@ 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); + if ($database === '') + { + $database = $this->database; + } + + if ($this->_execute('USE '.$database)) + { + $this->database = $database; + return TRUE; + } + + return FALSE; } // -------------------------------------------------------------------- @@ -608,4 +619,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 */ |