summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysql/mysql_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-08 14:39:24 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-08 14:39:24 +0200
commit9637b40ca9e9ac1cdce2b895d3db09848a6eef76 (patch)
tree7d042090e0aa9491b9f32649b62674a5111eb766 /system/database/drivers/mysql/mysql_forge.php
parent082ee2b054b0d61ac02fea3deb704290e8d6021a (diff)
escape_identifiers() to accept arrays as well
Diffstat (limited to 'system/database/drivers/mysql/mysql_forge.php')
-rw-r--r--system/database/drivers/mysql/mysql_forge.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php
index 7656c289c..d22454d84 100644
--- a/system/database/drivers/mysql/mysql_forge.php
+++ b/system/database/drivers/mysql/mysql_forge.php
@@ -142,7 +142,7 @@ class CI_DB_mysql_forge extends CI_DB_forge {
if (count($primary_keys) > 0)
{
$key_name = $this->db->escape_identifiers(implode('_', $primary_keys));
- $sql .= ",\n\tPRIMARY KEY ".$key_name.' ('.implode(', ', $this->db->protect_identifiers($primary_keys)).')';
+ $sql .= ",\n\tPRIMARY KEY ".$key_name.' ('.implode(', ', $this->db->escape_identifiers($primary_keys)).')';
}
if (is_array($keys) && count($keys) > 0)
@@ -152,7 +152,7 @@ class CI_DB_mysql_forge extends CI_DB_forge {
if (is_array($key))
{
$key_name = $this->db->escape_identifiers(implode('_', $key));
- $key = $this->db->protect_identifiers($key);
+ $key = $this->db->escape_identifiers($key);
}
else
{