1
I have a code like this in extcall module
$now = time();
$criteriaNoRecur = new CriteriaCompo();
$criteriaNoRecur->add(new Criteria('event_end', $now, '>='));
$criteriaNoRecur->add(new Criteria('event_isrecur', 0));
This produce MySQL select code like
OR (event_end >= $now AND event_isrecur = 0) in MySQL query filter.
How can I create criteria
I need to produce this code in MySQL query
AND (FIND_IN_SET($Today,REPLACE(event_recur_rules,'|',',')) AND event_isrecur = 1)
e.g.
$Today = substr(strtoupper(date('l')),0,2);
$criteriaNo = new CriteriaCompo();
$criteriaNo->add(new Criteria('event_recur_rules', $Today, 'FIND_IN_SET'));//??????????
$criteriaNo->add(new Criteria('event_isrecur', 1));
//event_recur_rules column has values like MO|TU|WE
$criteriaCompo = new CriteriaCompo();
$criteriaCompo->add($criteriaNoRecur, 'OR');
$criteriaCompo->add($criteriaNo, 'AND');