I have the following query:
$query = Doctrine_Query::create()
->from('Member m')
->where("m.type='1'")
->andWhere("m.name LIKE '%$term%'")
->orWhere("m.surname LIKE '%$term%'")
->orWhere("m.company LIKE '%$term%'")
->orderBy('id DESC');
But it's not working like I want — it is ignoring type
column.
What I need is result set where m.type=1
and some of other fields in this query is LIKE 'something'
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…