我正在使用以下查询来获取详细信息。
$moods = $this->Mood->find('all', array('conditions'=>$conditions,
'joins' => array(
array(
'table' => 'users',
'alias' => 'user',
'type' => 'INNER',
'conditions' => array(
'user.id = Mood.userId',
)
)
),
'fields' => array('user.id','user.name','user.email','user.imagePath',
'Mood.id', 'Mood.moods', 'Mood.body', 'Mood.created', 'Mood.group', 'Mood.mediaName', 'Mood.mediaType', 'Mood.isPrivate'),
'order' => array('Mood.created DESC'),
'limit' => 10,
'page' => $offset
));
然而,页面不是workign无主要是什么偏移我把结果相同,发生了什么
答案 0 :(得分:1)
希望这个帮助
$this->Paginator->settings = array('conditions'=>$conditions,.........);
$moods = $this->Paginator->paginate('Mood');