zoukankan      html  css  js  c++  java
  • 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);//获得申请的定位信息(管理员可以看到所有的定位信息)
  • 相关阅读:
    Python
    Python
    Python
    Python
    Python
    《The Rise and Fall of Scala》scala的兴衰
    Scala核心编程_第05章_函数式编程
    IntelliJ IDEA scala的源码设置
    Scala核心编程_第04章 程序流程控制
    Scala核心编程_第03章_运算符
  • 原文地址:https://www.cnblogs.com/loveMis/p/8875287.html
Copyright © 2011-2022 走看看