//create temporary table to store voter ids.
$tempTableName = CRM_Core_DAO::createTempTableName('civicrm_survey_respondent');
- CRM_Core_DAO::executeQuery("DROP TABLE IF EXISTS {$tempTableName}");
+ CRM_Core_DAO::executeQuery("DROP TEMPORARY TABLE IF EXISTS {$tempTableName}");
$query = "
CREATE TEMPORARY TABLE {$tempTableName} (
//create temporary table to store voter ids.
$tempTableName = CRM_Core_DAO::createTempTableName('civicrm_survey_respondent');
- CRM_Core_DAO::executeQuery("DROP TABLE IF EXISTS {$tempTableName}");
+ CRM_Core_DAO::executeQuery("DROP TEMPORARY TABLE IF EXISTS {$tempTableName}");
$query = "
CREATE TEMPORARY TABLE {$tempTableName} (
id int unsigned NOT NULL AUTO_INCREMENT,
$daoTestPrivilege = new CRM_Core_DAO();
$daoTestPrivilege->query("CREATE TEMPORARY TABLE import_job_permission_one(test int) ENGINE=InnoDB");
$daoTestPrivilege->query("CREATE TEMPORARY TABLE import_job_permission_two(test int) ENGINE=InnoDB");
- $daoTestPrivilege->query("DROP TABLE IF EXISTS import_job_permission_one, import_job_permission_two");
+ $daoTestPrivilege->query("DROP TEMPORARY TABLE IF EXISTS import_job_permission_one, import_job_permission_two");
unset($errorScope);
if ($daoTestPrivilege->_lastError) {
*/
public function tempTable($applyLimit = TRUE) {
// create temp table with contact ids,contribtuion id,membership id
- $dropTempTable = 'DROP TABLE IF EXISTS civireport_membership_contribution_detail';
+ $dropTempTable = 'DROP TEMPORARY TABLE IF EXISTS civireport_membership_contribution_detail';
CRM_Core_DAO::executeQuery($dropTempTable);
$sql = 'CREATE TEMPORARY TABLE civireport_membership_contribution_detail