Hi, I’m just starting with yii framework. I’ve previously used Codeigniter.
I ran into limit problem. The code that I’m using is the following:
$model = PostCategory::model(); $record = $model->with(array( 'posts'=>array( 'order'=>'posts.createTime DESC', 'limit'=>3, ))->findByPK($id);
I want to limit the posts queried for paging purposes. I’ve also tried to add
after limit, this doesn’t help too.
Any help is appreciated.