summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql/mssql_driver.php
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-09-30 21:53:52 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-09-30 21:53:52 +0200
commit52dc8ca4372eb36e9186cef0e34bf0cafe5b1cd8 (patch)
tree3ac539c147ee57fbc2d7d3c71fac2d1eff2ca241 /system/database/drivers/mssql/mssql_driver.php
parentfa5c4101d4dc171824e222d4650e0ad15409fce0 (diff)
Added backticks to column names when using insert_string and update_string. Relates to this bug report: http://codeigniter.com/bug_tracker/bug/4509/
Diffstat (limited to 'system/database/drivers/mssql/mssql_driver.php')
-rw-r--r--system/database/drivers/mssql/mssql_driver.php29
1 files changed, 19 insertions, 10 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 5ac90b451..9a912a320 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -390,7 +390,24 @@ class CI_DB_mssql_driver extends CI_DB {
// Are error numbers supported?
return '';
}
-
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Escape Column Name
+ *
+ * This function adds backticks around supplied column name
+ *
+ * @access private
+ * @param string the column name
+ * @return string
+ */
+ function _escape_column($column)
+ {
+ // Not necessary with MS SQL so we simply return the value
+ return $column;
+ }
+
// --------------------------------------------------------------------
/**
@@ -405,15 +422,7 @@ class CI_DB_mssql_driver extends CI_DB {
*/
function _escape_table($table)
{
- // I don't believe this is necessary with MS SQL. Not sure, though. - Rick
-
- /*
- if (strpos($table, '.') !== FALSE)
- {
- $table = '"' . str_replace('.', '"."', $table) . '"';
- }
- */
-
+ // Not necessary with MS SQL so we simply return the value
return $table;
}