Added backticks to column names when using insert_string and update_string. Relates to this bug report: http://codeigniter.com/bug_tracker/bug/4509/
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index f89000d..ed8f81c 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -371,7 +371,23 @@
{
return odbc_error($this->conn_id);
}
-
+ // --------------------------------------------------------------------
+
+ /**
+ * 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 ODBC so we simply return the value
+ return $column;
+ }
+
// --------------------------------------------------------------------
/**
@@ -386,9 +402,9 @@
*/
function _escape_table($table)
{
- // used to add backticks in other db drivers
+ // Not necessary with ODBC so we simply return the value
return $table;
- }
+ }
// --------------------------------------------------------------------