• tp3 key json 分页


     //json 强制转换为array

    $arr[$key]['checkpro'] = json_decode($val['checkpro'],JSON_FORCE_ARRAY);
        $arr[$key]['messpro'] = json_decode($val['messpro'],JSON_FORCE_ARRAY);

    {$Think.lang.$key}

    $pro = D('Project');
            $count = $pro->where('status != -1')->count();
           
            $page = new ThinkPage($count,8);  
            $data = $pro->alias('p')
            ->field('m.realname,p.*,d.dname')
            ->where('p.status !=-1 ')
            ->join(' left join ganen_member m on p.charge = m.uid')
            ->join(' left join ganen_department d on p.pro_id = d.did')
            ->limit($page->firstRow.','.$page->listRows)
            ->select();  
            $page->setConfig('first','首页');
            $page->setConfig('last','末页');
            $page->setConfig('prev','上一页');
            $page->setConfig('next','下一页');
            $page->setConfig('theme','%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');
            $show = $page->show();

            $this->assign('_page',$show);  
            $this->assign('_list', $data);
            $this->meta_title = '用户信息';
            $this->display();

  • 相关阅读:
    去掉安装程序被挂起,要重新启动电脑
    为什么要关闭数据库连接,可以不关闭吗?
    读取Excel异常定义了过多字段的解决方法
    关于打开ILDASM的方法
    SQL Server数据类型
    C++的MFC,与C#的.NET
    javascript数据类型
    日志记录组件[Log4net]详细介绍
    Xml的读取
    yield让代码更加简洁
  • 原文地址:https://www.cnblogs.com/simadongyang/p/7465813.html
Copyright © 2020-2023  润新知