*/
protected $sqlArray;
+
+ /**
+ * Can this report use the sql mode ONLY_FULL_GROUP_BY.
+ * @var bool
+ */
+ public $optimisedForOnlyFullGroupBy = TRUE;
/**
* Class constructor.
*/
* @param array $rows
*/
public function buildRows($sql, &$rows) {
+ if (!$this->optimisedForOnlyFullGroupBy) {
+ CRM_Core_DAO::disableFullGroupByMode();
+ }
$dao = CRM_Core_DAO::executeQuery($sql);
+ CRM_Core_DAO::enableFullGroupByMode();
if (!is_array($rows)) {
$rows = array();
}
* Class constructor.
*/
public function __construct() {
+ $this->optimisedForOnlyFullGroupBy = FALSE;
$this->_rollup = 'WITH ROLLUP';
$this->_autoIncludeIndexedFieldsAsOrderBys = 1;
$yearsInPast = 10;
/**
*/
public function __construct() {
-
+ $this->optimisedForOnlyFullGroupBy = FALSE;
// Check if CiviCampaign is a) enabled and b) has active campaigns
$config = CRM_Core_Config::singleton();
$campaignEnabled = in_array("CiviCampaign", $config->enableComponents);
* Class constructor.
*/
public function __construct() {
+ $this->optimisedForOnlyFullGroupBy = FALSE;
$this->_columns = array();
$this->_columns['civicrm_contact'] = array(