搜索后的分页错误

浏览:544 发布日期:2014/11/06 分类:求助交流 关键字: 分页
    public function peia_search(){
        $con=M('peia');
        import('@.ORG.Util.Page');

        $map['keywords']=$_REQUEST['keywords'];
        $where['peia_name']=array('like',"%".$_REQUEST['keywords']."%");
        $count=$con->where($where)->count();
        $page=new Page($count,10);
        foreach($map as $key=>$val) {
            $page->parameter   .=   "$key=".urlencode($val).'&';
        }
        $show=$page->show();
        $this->assign("show",$show);
        $list=$con->order('peia_id')->where($where)
        ->limit($page->firstRow.','.$page->listRows)->select();
        $region=M('region');
        foreach($list as $k=>$v){
            $list[$k]['gcname']=$region->where(array('re_id'=>$v['peia_cate']))->find();
        }
        $this->assign('kew',$_REQUEST['keywords']);

        $this->assign('clist',$list);    
        $this->display();
    }
进行搜索后,点击第二页出错,没有数据,求大神指点!
最佳答案
评论( 相关
后面还有条评论,点击查看>>