IN param for queryAll()

$id = '40,42,2,24,25,1';

$sql= 'select name from service where id IN (:id)';

When the IN condition ids are supplied within the query it returns all 6 rows

$rows = conn()->createCommand('select name from service where id IN (' . $id . ')')->queryAll();

When supplied as a query param this returns only the 1st row for id=40

$rows = conn()->createCommand($sql)->queryAll(true, array(':id' => $id));

how to provide the IN condition string in the queryAll params?

Check this post for a solution -

Well thats for CDbCriteria and findAll(), there i have used successfully using the addInCondition.

This is for queryAll(). i think i should upgrade to Yii v1.1.6 where i can use the query builder and specify the condition of the where clause.