$processor->setComponentTable($componentTable);
$processor->setComponentClause($componentClause);
- list($query, $select, $from, $where, $having) = $processor->runQuery($params, $order);
+ list($query, $queryString) = $processor->runQuery($params, $order);
// This perhaps only needs calling when $mergeSameHousehold == 1
self::buildRelatedContactArray($selectAll, $ids, $processor, $componentTable);
- $queryString = "$select $from $where $having";
-
$groupBy = self::getGroupBy($processor, $query);
$queryString .= $groupBy;
list($select, $from, $where, $having) = $query->query();
$this->setQueryFields($query->_fields);
$whereClauses = ['trash_clause' => "contact_a.is_deleted != 1"];
- if ($this->getRequestedFields() && ($this->getComponentTable())){
+ if ($this->getRequestedFields() && ($this->getComponentTable())) {
$from .= " INNER JOIN " . $this->getComponentTable() . " ctTable ON ctTable.contact_id = contact_a.id ";
}
elseif ($this->getComponentClause()) {
else {
$where .= " AND " . implode(' AND ', $whereClauses);
}
- return [$query, $select, $from, $where . $addressWhere, $having];
+ return [$query, "$select $from $where $having"];
}
/**