- $this->selectAdd( " distinct(join_on_id_{$jtn}.{$q['_join_cols']} ) as on_id_{$q['_join_cols']} ");
- $this->groupBy("on_id_{$q['_join_cols']} ");
- $this->whereAdd("{$q['_join_cols']} IS NOT NULL");
+ $this->selectAdd( " distinct(join_on_id_{$jtn}.{$jc} ) as on_id_{$jc]} ");
+ $this->groupBy("on_id_{$jc} ");
+ $this->whereAdd("{$jc} IS NOT NULL");
}
$this->selectAdd( "MAX(events.event_when) as event_when");
$this->orderBy('event_when DESC');