diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-08 00:39:20 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-08 00:39:20 +0200 |
commit | caa04f15096590261093dff2a8b59f266a1dcaf5 (patch) | |
tree | 49b8ee0d2fe4cc0fc2b4a3afc94562b4022c0a1c /system/database/drivers/mysql | |
parent | 5ef194df98294d5427c0e7582ca88b1fc06e1d72 (diff) |
Revert back some escape_identifiers() to proect_identifiers() as the first one can't handle arrays
Diffstat (limited to 'system/database/drivers/mysql')
-rw-r--r-- | system/database/drivers/mysql/mysql_forge.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php index 0279b9dfa..7656c289c 100644 --- a/system/database/drivers/mysql/mysql_forge.php +++ b/system/database/drivers/mysql/mysql_forge.php @@ -62,7 +62,7 @@ class CI_DB_mysql_forge extends CI_DB_forge { $sql .= "\n\t".$this->db->escape_identifiers($field); - empty($attributes['NAME']) OR ' '.$this->db->protect_identifiers($attributes['NAME']).' '; + empty($attributes['NAME']) OR ' '.$this->db->escape_identifiers($attributes['NAME']).' '; if ( ! empty($attributes['TYPE'])) { @@ -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->escape_identifiers($primary_keys)).')'; + $sql .= ",\n\tPRIMARY KEY ".$key_name.' ('.implode(', ', $this->db->protect_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->escape_identifiers($key); + $key = $this->db->protect_identifiers($key); } else { |