thinkphp搜索内容分页问题

搜索完之后第一页正常显示 点击别的页码显示404 下面是部分代码 用的tp3.2框架

            if (empty($data['time'])){
            $fycount = $model
                ->field("t1.*,t2.phone,t2.id as userid,t2.name as username,t2.inviter,t3.name as productname,t3.rate,t3.id as productid")
                ->table("dk.dk_record as t1,dk.dk_user as t2,dk.dk_product as t3")
                ->where("t1.userid = t2.id and t1.productid = t3.id and ".$data['condition']." like '".$data['key']."'")
                ->count();
            $page = new \Think\Page($fycount,2);
            $page->rollPage = 5;
            $show = $page->show();
            $temp = $model
                ->field("t1.*,t2.phone,t2.id as userid,t2.name as username,t2.inviter,t3.name as productname,t3.rate,t3.id as productid")
                ->table("dk.dk_record as t1,dk.dk_user as t2,dk.dk_product as t3")
                ->where("t1.userid = t2.id and t1.productid = t3.id and ".$data['condition']." like '".$data['key']."'")
                ->limit($page->firstRow,$page->listRows)
                ->select();
        }

                    搜索条件是$data里的内容

1个回答

是post数据的问题 用get

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!