Pregunta

The following is part of my query where if(teler.arrange ="Y",(teler.id_to IN ('1940')),0) GROUP BYto,

How will I have this in a Zend query which is currently like this

$objSelect->Orwhere('teler.id IN (?))', $where['id']);

¿Fue útil?

Solución

That's pretty straightforward:

$objSelect->orWhere('if(teler.arrange ="Y", (teler.id_to IN (?)), 0)', $where['id'])
          ->group('to');
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top