CRM-19884: DB Error on Activity Details Report
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 16 Jan 2017 06:06:03 +0000 (11:36 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 16 Jan 2017 06:06:03 +0000 (11:36 +0530)
CRM/Report/Form.php
CRM/Report/Form/Activity.php

index bb85fd82d7ca833192dbb0b34e1068e34d4b0075..afb8857a4419f329fe10d01da52e2549d682d84e 100644 (file)
@@ -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.
index 7e3bf6bffb7a22fd6ffb8328eebdcce41cc9823d..1447ce56b7c98dee580627bda96a334872657061 100644 (file)
@@ -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);