Query Builder,where子句

时间:2014-02-17 16:59:57

标签: query-builder

如何在Query Builder(Doctrine)构造中进行WHERE条件A AND(条件B或条件C)??

我试过了

->where
->andwhere
->orwhere

->where
->orwhere
->orwhere

但两者都不起作用

1 个答案:

答案 0 :(得分:0)

可以这样做:

                ->where("bp.active = :active")
                ->andWhere("p.name1 Like :name OR p.name2 Like :name")