Where In (...) With Yii Query Builder


Is there any easy way to do WHERE IN (:wherein) using the Yii Query Builder?


->where(array('in', 'id', array(1, 2))


Thanks that works!!!

Is there any way to have both a ‘WHERE IN (…)’ and ‘id=1’ at the same time using Yii query builder?

(So the Where statement looks like: WHERE color IN(‘Red’, ‘Blue’) AND id=1)

Thanks :)

Plz read the link.

Thanks :)

I always seem too miss the simplest things in Yii

guys, can u direct me to a demo where in the query builder is used and to implement join of two tables

as am new to yii help me out :unsure: