I have a query that gives me a number of pairs of context_id and class_id. I want one of those to be met by another query. So I need to do where (co1 and cl1) or (co2 and cl2) or...
This one gives me a series of and's:
foreach($tscarr as $tsc)
{
$grid->dq->where('context_id',$tsc['context_id'])->where('class_id',$tsc['class_id']);
}
I know from this page: http://agiletoolkit.org/doc/dsql/where that I should be able to do or. But I get an error when trying to use or in this way:
$grid->dq->where($grid->dq->or()->where($grid->dq->where('context_id',$tsc['context_id'])->where('class_id',$tsc['class_id'])));
Hope you have a good idea how to solve this...