Example #1
0
 /**
  * Build the sub query which is used when merging in
  * repeat element records from their joined table into the one field.
  * Overwritten in database join element to allow for building
  * the join to the table containing the stored values required ids
  *
  * @since   2.1.1
  *
  * @return  string	sub query
  */
 protected function buildQueryElementConcatId()
 {
     $str = parent::buildQueryElementConcatId();
     $jointable = $this->getJoinModel()->getJoin()->table_join;
     $dbtable = $this->actualTableName();
     $db = JFactory::getDbo();
     $table = $this->getListModel()->getTable();
     $parentKey = $this->buildQueryParentKey();
     $fullElName = $this->getFullName(true, false) . '_id';
     $str .= ", (SELECT GROUP_CONCAT(" . $this->element->name . " SEPARATOR '" . GROUPSPLITTER . "') FROM {$jointable} WHERE " . $jointable . ".parent_id = " . $parentKey . ") AS {$fullElName}";
     return $str;
 }