[TYPO3-mvc] logicalAnd with multiple conditions

Steffen Ritter info at rs-websystems.de
Mon Apr 25 14:34:51 CEST 2011


Am 25.04.2011 14:26, schrieb Dmitri Pisarev:
> Hi dear community!
> I'm back to extbase development after a serious break, and here's the
> question I can't figure out:
> I need to build query with many filters. Ofcourse this doesn't work:
> foreach ($filters as $filter) {
> $str = '%' . $filter['data']['value'] . '%';
> $query->matching($query->like($filter['field'], $str));
> }
>
> Then how do I do it? logicalAnd receives only two operands, and even if
> it did receive many, then how do I apply them in a loop?
>
> Thanks in advance.
>
> Happy Easter!
> Dmitri Pisarev.
logicalAnd also is able to process an array.

regards

Steffen


More information about the TYPO3-project-typo3v4mvc mailing list