Question

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']);

Was it helpful?

Solution

That's pretty straightforward:

$objSelect->orWhere('if(teler.arrange ="Y", (teler.id_to IN (?)), 0)', $where['id'])
          ->group('to');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top