Complex WHERE clauses using the PHP Doctrine ORM

后端 未结 7 1877
长发绾君心
长发绾君心 2020-12-13 09:15

I\'m using the PHP Doctrine ORM to build my queries. However, I can\'t quite seem to figure how to write the following WHERE clause using DQL (Doctrine Query Language):

相关标签:
7条回答
  • 2020-12-13 10:15
    $q->andWhere("category1 IN ( $subcategory_in_clause )
                  OR category2 IN ( $subcategory_in_clause )
                  OR category3 IN ( $subcategory_in_clause )");
    

    would you be so kind to try this variant, not sure if it works, but worth a shot

    0 讨论(0)
提交回复
热议问题