summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan José González <juanjosegzl@madeinsocial.com>2011-09-28 00:21:14 +0200
committerJuan José González <juanjosegzl@madeinsocial.com>2011-09-28 00:21:14 +0200
commit8b4d83b23b3b93e8042b01d9117f496206b309c0 (patch)
treeb5a761ba8cba1e661ad0246c0b06a6e9aef55084
parent5a3284edd6f3de5871804c7e24a9d74e57b2b7a6 (diff)
Fixing issue 465: select_max is adding prefix to table aliases when is not necessary
-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 7162e2ac5..83518232e 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 '.$this->_protect_identifiers(trim($alias));
+ $sql = $this->_protect_identifiers($type.'('.trim($select).')').' AS '.$this->_protect_identifiers(trim($alias));
$this->ar_select[] = $sql;