BWSnippet

Yii - count attributes of related model

Yii - count attributes of related model

quick count of attributes that are related to a model

Plans::model()->countByAttributes(array('category_id'=>$category->category_id));

Tags

Yii - count attributes of related model