From d09afb3e8ff51519dde617c3ed4632a9d8928d64 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Mon, 16 Jan 2017 11:36:03 +0530 Subject: [PATCH] CRM-19884: DB Error on Activity Details Report --- CRM/Report/Form.php | 2 +- CRM/Report/Form/Activity.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index bb85fd82d7..afb8857a44 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -444,7 +444,7 @@ class CRM_Report_Form extends CRM_Core_Form { /** * @var string Database attributes - character set and collation */ - protected $_databaseAttributes = 'DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci'; + protected $_databaseAttributes = ' DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci'; /** * SQL being run in this report. diff --git a/CRM/Report/Form/Activity.php b/CRM/Report/Form/Activity.php index 7e3bf6bffb..1447ce56b7 100644 --- a/CRM/Report/Form/Activity.php +++ b/CRM/Report/Form/Activity.php @@ -791,7 +791,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}"; $this->customDataFrom(); $this->where('target'); $insertCols = implode(',', $this->_selectAliases); - $tempQuery = "CREATE TEMPORARY TABLE civireport_activity_temp_target" . $this->_databaseAttributes . " AS + $tempQuery = "CREATE TEMPORARY TABLE civireport_activity_temp_target {$this->_databaseAttributes} AS {$this->_select} {$this->_from} {$this->_where} "; CRM_Core_DAO::executeQuery($tempQuery); -- 2.25.1