// note escapeString is a must here and we can't send the imploded value as second arguement to
// the executeQuery(), since that would put single quote around the string and such a string
// of comma separated integers would not work.
- $groupIDString = CRM_Core_DAO::escapeString(implode(', ', $groupID));
+ $groupIDString = CRM_Core_DAO::escapeString(implode(', ', $groupIDs));
$groupIDClause = "AND (g.id IN ( {$groupIDString} ))";
}
( $now >= g.refresh_date )
)
$groupIDClause
- $limitClause
$orderClause
+ $limitClause
";
$dao = CRM_Core_DAO::executeQuery($query);
}
if (!empty($refreshGroupIDs)) {
- $refreshGroupIDString = CRM_Core_DAO::escapeString(implode(', ', $refreshGroupIDString));
+ $refreshGroupIDString = CRM_Core_DAO::escapeString(implode(', ', $refreshGroupIDs));
$time = CRM_Utils_Date::getUTCTime('YmdHis', $smartGroupCacheTimeout * 60);
$query = "
UPDATE civicrm_group g
WHERE g.id IN ( {$refreshGroupIDString} )
AND g.refresh_date IS NULL
";
+ CRM_Core_DAO::executeQuery($query);
}
if (empty($processGroupIDs)) {