i dont know if this is a bug or feature but it does not work for me:
$inquery = "(1, 2, 4)";
$criteria->condition='id IN :inquery';
$criteria->params=array('inquery'=>$inquery);
$barList = Bar::model()->findAll($criteria);
CDbException
Description
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''(1, 2, 4)'' at line 1
a had to do
$criteria->condition='id IN {$inquery}';
i think its not good solution, so what is preffered way to do such selection ?