countAllByPK

I miss function countAllByPK :)

This is useful if you want to paginate items, when you know ids and provide additional criteria.

or what is the right syntax to pass an array to IN SQL condition?




$pks = array(1, 2, 3);

$post = Post::model();

$criteria=$post->getCommandBuilder()->createPkCriteria($post->getTableSchema(), $pks);

$count = $post->count($criteria);