$list=$prod->where($map)->limit($Page->firstRow.','.$Page->listRows)->order('id')->select();$list->$prod->select();出来是有数剧的。难到模版有问题吗 我看了也没问题真心求解谢谢
import('@.ORG.Util.Page');// 导入分页类$Page->url = 'Dl/show/id/'.$id;$coms['belong'] = $id;$count = $dl_discuss->where($coms)->count();//该资源的评论总数$this->assign('count',$count);$Page = new Page($count,5);// 实例化分页类 传入总记录数// 进行分页数据查询 注意page方法的参数的前面部分是当前的页数使用 $_GET[p]获取$nowPage = isset($_GET['p'])?$_GET['p']:1;$comment = $dl_discuss->where($coms)->page($nowPage.','.$Page->listRows)->select();//评论内容和评论时间以及评论者uid$this->assign('comment',$comment);//绑定资源评论表内的信息//dump($comment);$us = $user->field('id,face,petname')->select();//根据查询出来的用户id进行查询$this->assign('us',$us);//绑定用户信息数据传送到模版中进行遍历//dump($us);$show = $Page->show();// 分页显示输出$this->assign('page',$show);// 赋值分页输出