1
lunaticalm
How can I add my criteria code to CriteriaCompo() in extcall module.
  • 2009/11/18 14:07

  • lunaticalm

  • Just popping in

  • Posts: 14

  • Since: 2005/1/4 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 0in 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');

Login

Who's Online

389 user(s) are online (313 user(s) are browsing Support Forums)


Members: 0


Guests: 389


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits