/** * This function writes a record to the log table to indicate that this rule for this event is triggered * * @param CRM_Civirules_EventData_EventData $eventData */ protected static function logRule(CRM_Civirules_EventData_EventData $eventData) { $sql = "INSERT INTO `civirule_rule_log` (`rule_id`, `contact_id`, `log_date`) VALUES (%1, %2, NOW())"; $params[1] = array($eventData->getEvent()->getRuleId(), 'Integer'); $params[2] = array($eventData->getContactId(), 'Integer'); CRM_Core_DAO::executeQuery($sql, $params); }