WHERE a = 1 AND (b = 1 Or b = 2) AND (c = 1 OR c = 2)
How can i make this in Doctrine?
$q->where("a = 1");
$q->andWhere("b = 1")
$q->orWhere("b = 2")
$q->andWhere("c = 1")
$q->orWhere("d = 2")
this isnt correctly... Should be:
$q->where("a = 1");
$q->andWhere("b = 1")
$q->orWhere("b = 2")
$q->andWhere("c = 1")
$q->orWhere("d = 2")
but how can i make it? In Propel is function getNewCriterion, and in Doctrine...?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…