[TYPO3-mvc] WHERE IN (...) query statement

Rikkert Steenbergen - Buyways B.V. rikkert at buyways.nl
Wed Oct 28 10:43:31 CET 2009


Hi,

Great, I just tested your solution and it gives the expected result:

$constraint = $query->equals($propertyName, $arrayOfPossibleValues);       
$objects = $query->matching($constraint)->execute();

Thanks!

Regard, Rikkert

Jochen Rau wrote:
> Hi.
>
> Rikkert Steenbergen - Buyways B.V. wrote:
>> $constraint = null;
>> foreach($list as $uid) {
>> if (!isset($constraint)) {
>> $constraint = $query->equals('field', $uid);
>> } else {
>> $constraint = $query->logicalOr(
>> $constraint,
>> $query->equals('field', $uid)
>> );
>> } }
>> $items = $query->matching($constraint)->execute();
>
> I have implemented a solution with changeset r1587.
>
> http://forge.typo3.org/issues/show/5154
>
> You may now pass an array to the equals method, like
>
> $objects = $query->matching($propertyName, 
> $arrayOfPossibleValues)->execute();
>
> This might be a preliminary solution, because it has to be synced with 
> FLOW3.
>
> Anyway, Could you please test it an give feedback?
>
> Regards
> Jochen
>

-- 

    * Rikkert Steenbergen, Projectleider
    * Buyways B.V.  Friesestraatweg 215c, 9743 AD Groningen
    * T. 050 853 66 33  M. 06 27 44 21 99  F. 050 853 66 01  KvK.
      01074105  www.buyways.nl <http://www.buyways.nl>

    *
      ------------------------------------------------------------------------
    * Disclaimer: deze e-mail is vertrouwelijk en uitsluitend bedoeld
      voor de geadresseerde. Als blijkt dat het bericht niet voor u
      bestemd is, verzoeken wij u de afzender hiervan op de hoogte te
      stellen. Het verstrekken van de informatie aan en gebruik door
      anderen is niet toegestaan. Buyways B.V. sluit iedere
      aansprakelijkheid uit die voortvloeit uit elektronische verzending.
    *
      ------------------------------------------------------------------------



More information about the TYPO3-project-typo3v4mvc mailing list