diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-09-30 21:53:52 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-09-30 21:53:52 +0200 |
commit | 52dc8ca4372eb36e9186cef0e34bf0cafe5b1cd8 (patch) | |
tree | 3ac539c147ee57fbc2d7d3c71fac2d1eff2ca241 /system/database/DB_driver.php | |
parent | fa5c4101d4dc171824e222d4650e0ad15409fce0 (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/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 1450a0644..b937ffd6a 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -911,11 +911,10 @@ class CI_DB_driver { foreach($data as $key => $val)
{
- $fields[] = $key;
+ $fields[] = $this->_escape_column($key);
$values[] = $this->escape($val);
}
-
return $this->_insert($this->prep_tablename($table), $fields, $values);
}
@@ -940,7 +939,7 @@ class CI_DB_driver { $fields = array();
foreach($data as $key => $val)
{
- $fields[$key] = $this->escape($val);
+ $fields[$this->_escape_column($key)] = $this->escape($val);
}
if ( ! is_array($where))
|