}
public function groupBy() {
- $this->_groupBy = array();
+ $this->_groupBy = "";
if (is_array($this->_params['group_bys']) &&
!empty($this->_params['group_bys'])
) {
}
public function groupBy() {
- $this->_groupBy = array();
+ $this->_groupBy = "";
$append = FALSE;
if (is_array($this->_params['group_bys']) &&
)) {
$append = '';
}
- $this->_groupBy[] = "$append {$this->_params['group_bys_freq'][$fieldName]}({$field['dbAlias']})";
+ $this->_groupByArray[] = "$append {$this->_params['group_bys_freq'][$fieldName]}({$field['dbAlias']})";
$append = TRUE;
}
else {
- $this->_groupBy[] = $field['dbAlias'];
+ $this->_groupByArray[] = $field['dbAlias'];
}
}
}
}
if (!empty($this->_statFields) &&
- (($append && count($this->_groupBy) <= 1) || (!$append)) &&
+ (($append && count($this->_groupByArray) <= 1) || (!$append)) &&
!$this->_having
) {
$this->_rollup = " WITH ROLLUP";
}
- $groupBy = $this->_groupBy;
- $this->_groupBy = "GROUP BY " . implode(', ', $this->_groupBy);
+ $groupBy = $this->_groupByArray;
+ $this->_groupBy = "GROUP BY " . implode(', ', $this->_groupByArray);
}
else {
$groupBy = "{$this->_aliases['civicrm_contact']}.id";
}
public function orderBy() {
- $this->_orderBy = array();
+ $this->_orderBy = "";
foreach ($this->_columns as $tableName => $table) {
if (array_key_exists('order_bys', $table)) {
foreach ($table['order_bys'] as $fieldName => $field) {
- $this->_orderBy[] = $field['dbAlias'];
+ $this->_orderByArray[] = $field['dbAlias'];
}
}
}
- $this->_orderBy = "ORDER BY " . implode(', ', $this->_orderBy) . " ";
+ $this->_orderBy = "ORDER BY " . implode(', ', $this->_orderByArray) . " ";
}
public function postProcess() {