diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-21 20:44:52 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-21 20:44:52 +0200 |
commit | fa2c3b57ba60558c4793dec373dd2ddbd4fba1da (patch) | |
tree | e5f1dcf29820d97ec517eea31c46500feeaeffc5 | |
parent | 27a883c946ee524bb7930edfcfc6e8c153119929 (diff) | |
parent | 7e7338e1e12fd2deb769f3d486b3bcb253e7e275 (diff) |
Merge pull request #238 from danmontgomery/patch-1
Fix #106: select_max() problem with Reserved Words
-rw-r--r-- | system/database/DB_active_rec.php | 2 |
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; |