我需要一个代码示例,如何将doctrine查询构建器用于下一个SQL示例语句:
WHERE
a = 1
AND (
(b = 1 AND c = 1)
OR
(d = 1 AND e = 1)
)
我认为它应该是这样的: (我知道它的语法错误,所以我要求你给我一个正确的例子!)
$qb->andWhere('a = 1')
$qb->andWhere(
$qb->orWhere(
[$qb->andWhere('b = 1'), $qb->andWhere('c = 1')],
[$qb->andWhere('d = 1'), $qb->andWhere('e = 1')]
)
);