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/mssql/mssql_driver.php | |
parent | 7a2412cfe7f7d8db3eb845542609c476c52efc3d (diff) |
Add an optional database name parameter to db_select()
Diffstat (limited to 'system/database/drivers/mssql/mssql_driver.php')
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 2a1098932..27b492f96 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -114,14 +114,14 @@ 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 = '') { // Note: The brackets are required in the event that the DB name // contains reserved characters - return @mssql_select_db('['.$this->database.']', $this->conn_id); + return @mssql_select_db('['.($database == '' ? $this->database : $database).']', $this->conn_id); } // -------------------------------------------------------------------- @@ -676,4 +676,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 */ |