Commit 9858dc0b authored by eileen's avatar eileen

Make return for query more like sql

parent e034ee91
......@@ -201,13 +201,11 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
$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;
......
......@@ -721,7 +721,7 @@ class CRM_Export_BAO_ExportProcessor {
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()) {
......@@ -741,7 +741,7 @@ class CRM_Export_BAO_ExportProcessor {
else {
$where .= " AND " . implode(' AND ', $whereClauses);
}
return [$query, $select, $from, $where . $addressWhere, $having];
return [$query, "$select $from $where $having"];
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment