WHERE a = 1 AND (b = 1 Or b = 2) AND (c = 1 OR c = 2)
我该如何在学说中做到这一点?
$q->where("a = 1");
$q->andWhere("b = 1")
$q->orWhere("b = 2")
$q->andWhere("c = 1")
$q->orWhere("d = 2")
这不正确...应该是:
$q->where("a = 1");
$q->andWhere("b = 1")
$q->orWhere("b = 2")
$q->andWhere("c = 1")
$q->orWhere("d = 2")
但是我该怎么做呢?在Propel中是函数getNewCriterion,在Doctrine中是函数...?
where()
电话里呢?