summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlsrv
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/sqlsrv
parent082ee2b054b0d61ac02fea3deb704290e8d6021a (diff)
escape_identifiers() to accept arrays as well
Diffstat (limited to 'system/database/drivers/sqlsrv')
-rw-r--r--system/database/drivers/sqlsrv/sqlsrv_forge.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/drivers/sqlsrv/sqlsrv_forge.php b/system/database/drivers/sqlsrv/sqlsrv_forge.php
index 559746e87..e6f7e1ac1 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_forge.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_forge.php
@@ -103,7 +103,7 @@ class CI_DB_sqlsrv_forge extends CI_DB_forge {
if (count($primary_keys) > 0)
{
- $sql .= ",\n\tPRIMARY KEY (".implode(', ', $this->db->protect_identifiers($primary_keys)).')';
+ $sql .= ",\n\tPRIMARY KEY (".implode(', ', $this->db->escape_identifiers($primary_keys)).')';
}
if (is_array($keys) && count($keys) > 0)
@@ -111,7 +111,7 @@ class CI_DB_sqlsrv_forge extends CI_DB_forge {
foreach ($keys as $key)
{
$key = is_array($key)
- ? $this->db->protect_identifiers($key)
+ ? $this->db->escape_identifiers($key)
: array($this->escape_identifiers($key));
$sql .= ",\n\tFOREIGN KEY (".implode(', ', $key).')';