Skip to content
Snippets Groups Projects
Commit 2de6ecf3 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge pull request #2324 from yashodha/4.4

CRM-13947: fix where clause condition
parents d7e6435a 8010925d
No related branches found
No related tags found
No related merge requests found
......@@ -1026,14 +1026,18 @@ LEFT JOIN {$reminderJoinClause}
reminder.entity_id = c.id AND
reminder.entity_table = 'civicrm_contact' AND
reminder.action_schedule_id = {$actionSchedule->id}";
$addWhereClause = '';
if ($addWhere) {
$addWhereClause = "AND {$addWhere}";
}
$insertAdditionalSql ="
INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
{$addSelect}
FROM ({$contactTable}, {$table})
LEFT JOIN {$additionReminderClause}
{$addGroup}
{$additionWhere} c.is_deleted = 0 AND c.is_deceased = 0 AND {$addWhere}
{$additionWhere} c.is_deleted = 0 AND c.is_deceased = 0
{$addWhereClause}
AND {$dateClause}
AND c.id NOT IN (
SELECT rem.contact_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment