$fCriteria = new CDbCriteria;
$fCriteria->with = array('textualContent','entity');
$fCriteria->limit = 2;
$fashionFindsDataProvider = new CActiveDataProvider('FashionFinds',
array(
'criteria'=>$fCriteria,
'pagination'=>false,
)
);
If you don't, limit does not take effect. Note that I'm using a CDbCriteria object, but you could also do this:
$fashionFindsDataProvider = new CActiveDataProvider('FashionFinds',
array(
'criteria'=>array('limit'=>2), // Leaving out the other junk from above for easy reading
'pagination'=>false,
)
);
No comments:
Post a Comment