This will not work:
$ids = [1,2,3];
Model::find(array(
"conditions" => "id IN (?0)",
"bind" => array(0 => $ids)
));
Neither this:
$ids = implode("','", [1,2,3]);
Model::find(array(
"conditions" => "id IN (?0)",
"bind" => array(0 => $ids)
));
The only thing that works is:
Model::find(array(
"conditions" => "id IN (?0, ?1, ?2)",
"bind" => array(0 => 1, 1 => 1, 2 => 2)
));
But that sucks, because we have to build the placeholders ourselves. We should be able to pass an array to the bind params and the framework should know to transform it to the correct form. Most other frameworks do.