Performing Relational query with array of parameter


$users=User::model()->with(array(

    'profile'=>array(

        'select'=>false,

        'joinType'=>'INNER JOIN',

        'condition'=>'profile.age=25',

    ),

))->findAll();

considering im getting all the user that the age is 25

what im unable to find is how to add an array of parameters so i can get user with a condition "range of ages array(25,26,27,28)"

could anyone tell me how to add this array to this query

thanks in advance

try this:


'condition'=>'profile.age IN (25,26,27,28)',