function groupBy() { parent::groupBy(); //@todo - need to re-visit this - bad behaviour from pa if ($this->_groupBy == 'GROUP BY') { $this->_groupBY = NULL; } // if a stat field has been selected the do a group by if (!empty($this->_statFields) && empty($this->_groupBy)) { $this->_groupBy[] = $this->_aliases[$this->_baseTable] . ".id"; } //@todo - this should be in the parent function or at parent level - perhaps build query should do this? if (!empty($this->_groupBy) && is_array($this->_groupBy)) { $this->_groupBy = 'GROUP BY ' . implode(',', $this->_groupBy); } }
public function groupBy() { parent::groupBy(); if (empty($this->_groupBy) && $this->_totalPaid) { $groupBy = array("{$this->_aliases['civicrm_pledge']}.id", "{$this->_aliases['civicrm_pledge']}.currency"); $this->_groupBy = CRM_Contact_BAO_Query::getGroupByFromSelectColumns($this->_selectClauses, $groupBy); } }
public function groupBy() { parent::groupBy(); if (empty($this->_groupBy) && $this->_totalPaid) { $this->_groupBy = " GROUP BY {$this->_aliases['civicrm_pledge']}.id, {$this->_aliases['civicrm_pledge']}.currency"; } }
/** * GROUP BY for the query. */ public function groupBy() { parent::groupBy(); // $this->_groupBy = "GROUP BY {$this->_aliases['organization']}.id"; }