summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-09-28 23:15:06 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-09-28 23:15:06 +0200
commit703d34489105d4556622e23393eee0c09178c82f (patch)
treeb5a761ba8cba1e661ad0246c0b06a6e9aef55084
parent5a3284edd6f3de5871804c7e24a9d74e57b2b7a6 (diff)
parent8b4d83b23b3b93e8042b01d9117f496206b309c0 (diff)
Merge pull request #504 from juanjosegzl/develop
Fixing issue 465: select_max is adding prefix to table aliases when is no
-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;