summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_active_rec.php2
-rw-r--r--user_guide/changelog.html1
2 files changed, 2 insertions, 1 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index d58580637..6f50c110d 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -1476,7 +1476,7 @@ class CI_DB_active_record extends CI_DB_driver {
$sql = ( ! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT ';
- $sql .= (count($this->ar_select) == 0) ? '*' : implode(', ', $this->ar_select);
+ $sql .= (count($this->ar_select) == 0) ? '*' : implode(', ', $this->_filter_table_aliases($this->ar_select));
if ($select_override !== FALSE)
{
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index a7ad022d2..4b93f6049 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -101,6 +101,7 @@ Change Log
<ul>
<li>Fixed assorted user guide typos (#3453, #4364).</li>
<li>Fixed an AR_caching error where it wasn't tracking table aliases (#3463).</li>
+ <li>Fixed an AR bug when joining with a table alias and table prefix (#4400).</li>
<li>Fixed a bug in the DB class testing the $params argument.</li>
<li>Fixed a bug in the Table library where the integer 0 in cell data would be displayed as a blank cell.</li>
<li>Fixed bugs (#3523, #4350) in get_filenames() with recursion and problems with Windows when $include_path is used.</li>