summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
Diffstat (limited to 'system/database')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index fbc0701c0..6130bf4cb 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -76,7 +76,9 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function db_select()
{
- return @mssql_select_db($this->database, $this->conn_id);
+ // Note: The brackets are required in the event that the DB name
+ // contains reserved characters
+ return @mssql_select_db('['.$this->database.']', $this->conn_id);
}
// --------------------------------------------------------------------