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

Username:
Password:

Lost Password? Register now!

Who's Online

55 user(s) are online (38 user(s) are browsing Support Forums)


Members: 0


Guests: 55


more...

Donat-O-Meter

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

Latest GitHub Commits