summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-02-09 17:09:31 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-02-09 17:09:31 +0100
commita12216baff3aef18413a84e3d37aba2096b5ebe8 (patch)
tree16627ddbe167f9c19b603c8e57c5868a8c76de00 /system/database
parent4bc54c7c657a84bd9c43d5b500e1c33029f0d636 (diff)
Reverted recent MySQL backtick escaping as some queries were double-escaping.
Diffstat (limited to 'system/database')
-rw-r--r--system/database/drivers/mysql/mysql_driver.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index c9fc1ecab..72c834b8f 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -532,7 +532,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
function _insert($table, $keys, $values)
{
- return "INSERT INTO ".$table." (`".implode('`, `', $keys)."`) VALUES (".implode(', ', $values).")";
+ return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
}
// --------------------------------------------------------------------
@@ -551,7 +551,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
function _replace($table, $keys, $values)
{
- return "REPLACE INTO ".$table." (`".implode('`, `', $keys)."`) VALUES (".implode(', ', $values).")";
+ return "REPLACE INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
}
// --------------------------------------------------------------------
@@ -569,7 +569,7 @@ class CI_DB_mysql_driver extends CI_DB {
*/
function _insert_batch($table, $keys, $values)
{
- return "INSERT INTO ".$table." (`".implode('`, `', $keys)."`) VALUES ".implode(', ', $values);
+ return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values);
}
// --------------------------------------------------------------------
@@ -592,7 +592,7 @@ class CI_DB_mysql_driver extends CI_DB {
{
foreach($values as $key => $val)
{
- $valstr[] = sprintf('`%s` = %s', $key, $val);
+ $valstr[] = $key . ' = ' . $val;
}
$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;