summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-08-06 13:14:32 +0200
committerAndrey Andreev <narf@devilix.net>2013-08-06 13:14:32 +0200
commit5b55c15f24b518aa4775a0c15382c7b4bf72e1bc (patch)
tree152e95b587ea4e5fa09bf9f0ae9f6c15caaac066 /system
parent79f888b27bd67724b30aa6dd30e2ae5162b1fea8 (diff)
Fix #2585
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_query_builder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 355613c6f..e6a108209 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -385,7 +385,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$alias = $this->_create_alias_from_table(trim($select));
}
- $sql = $this->protect_identifiers($type.'('.trim($select).')').' AS '.$this->escape_identifiers(trim($alias));
+ $sql = $type.'('.$this->protect_identifiers(trim($select)).') AS '.$this->escape_identifiers(trim($alias));
$this->qb_select[] = $sql;
$this->qb_no_escape[] = NULL;