summaryrefslogtreecommitdiffstats
path: root/system/database/DB_active_rec.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-08-21 20:44:52 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-08-21 20:44:52 +0200
commitfa2c3b57ba60558c4793dec373dd2ddbd4fba1da (patch)
treee5f1dcf29820d97ec517eea31c46500feeaeffc5 /system/database/DB_active_rec.php
parent27a883c946ee524bb7930edfcfc6e8c153119929 (diff)
parent7e7338e1e12fd2deb769f3d486b3bcb253e7e275 (diff)
Merge pull request #238 from danmontgomery/patch-1
Fix #106: select_max() problem with Reserved Words
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r--system/database/DB_active_rec.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 841ede28e..37d162bc1 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -196,7 +196,7 @@ class CI_DB_active_record extends CI_DB_driver {
$alias = $this->_create_alias_from_table(trim($select));
}
- $sql = $type.'('.$this->_protect_identifiers(trim($select)).') AS '.$alias;
+ $sql = $type.'('.$this->_protect_identifiers(trim($select)).') AS '.$this->_protect_identifiers(trim($alias));
$this->ar_select[] = $sql;