• TP分页


        $model_location = M('location');
                    $page_count_location = $model_location->count();//获得数据库里面数据的数量,用于分页
                    $page = new ThinkPage($page_count_location,5);//
                    $startno = $page->firstRow;//起始行数
                    $pagesize = $page->listRows;//页面大小
                    $this->lastSuffix = false;
                    $page->setConfig('prev','上一页');
                    $page->setConfig('next','下一页');
                    $page->setConfig('first','首页');
                    $page->setConfig('last','末页');
                    $show = $page->show();
                    $this->assign('page_location',$show);//页码
                    $list_location = M()->query("select location.locationid,location.casename,b.username as username1,c.username as username2,location.supplytime,location.validtime,a.username,locationstatus.locationstatus,location.Content from location,user a,user b,user c,locationstatus where location.applyuserid = a.userid and locationstatus.LocationStatusId = location.locationstatus and location.CaseUserId = b.userid and c.userid = location.LocationUserId limit $startno,$pagesize");//进行数据库信息查询
                    $this->assign('list_location',$list_location);//获得申请的定位信息(管理员可以看到所有的定位信息)
  • 相关阅读:
    通过url在两个页面之间传值
    $.ajax数据传输成功却执行失败的回调函数
    5.26小测
    洛谷——AC记
    7.2模拟赛
    6.30模拟赛
    洛谷——每日一题
    洛谷——动态规划
    致创营
    BSGS
  • 原文地址:https://www.cnblogs.com/loveMis/p/8875287.html
Copyright © 2020-2023  润新知