搜索分页中有区间查询怎么办

浏览:621 发布日期:2015/10/14 分类:求助交流
搜索分页中有区间查询,翻页后,数组的带不过来。应该怎么处理啊?    public function index(){
        if(IS_POST){
        $Search=new \Home\Model\OrderModel();
        $result=$Search->Search();
        $count =count($result); 
        $Page =new \Think\Page($count,20);
        $map['brush']=I('post.brush');
        $starttime=strtotime(I('post.starttime'));
        $endtime=strtotime(I('post.endtime'));
        $map['datetime']= array(array('gt',$starttime),array('lt',$endtime)) ;
        foreach($map as $key=>$val) {
            $Page->parameter   .=   "$key=".urlencode($val).'&';
            var_dump($Page->parameter);
        }
        $page = $Page->show();
        $list   = $result;
        $this->assign("count",$count);
        $this->assign("page", $page);
        $this->assign("list", $list);
        }
        $this->display(); 
        }
这是搜索的控制器。应该怎么去处理啊?
最佳答案
评论( 相关
后面还有条评论,点击查看>>