hello.
which is the best among these two method
1- i used the PHP count method to display counts of an object iteration
eg <?php echo count($model); ?>
2- using Yii AR self::STAT to get the value of counts
hello.
which is the best among these two method
1- i used the PHP count method to display counts of an object iteration
eg <?php echo count($model); ?>
2- using Yii AR self::STAT to get the value of counts
$criteria = new CDbCriteria;
$criteria->condition = "foo=1";
// why do not use CActiveRecord count property?
$count = SomeModel::model()->count($criteria);