Home > Backend Development > PHP Tutorial > php与mysql分页问题,为什么别的界面都能用单独这个的下一页不能用,这么写有问题,该怎样修改

php与mysql分页问题,为什么别的界面都能用单独这个的下一页不能用,这么写有问题,该怎样修改

WBOY
Release: 2016-06-02 11:32:59
Original
748 people have browsed it

php

function get_links_list_all($key)
{
$result = get_filter();
if ($result === false)
{
$filter = array();
$filter['sort_by'] = empty($_REQUEST['sort_by']) ? 'user_id' : trim($_REQUEST['sort_by']);
$filter['sort_order'] = empty($_REQUEST['sort_order']) ? 'DESC' : trim($_REQUEST['sort_order']);
$sql = 'SELECT COUNT(*) FROM ' .$GLOBALS['ecs']->table('users')." WHERE employee_key='$key'";
$filter['record_count'] = $GLOBALS['db']->getOne($sql);

<code>    $filter = page_and_size($filter);   $sql  = 'SELECT * FROM ' .$GLOBALS['ecs']->table('users').            " WHERE employee_key='$key'";    set_filter($filter, $sql);}else{    $sql    = $result['sql'];    $filter = $result['filter'];}$res = $GLOBALS['db']->selectLimit($sql, $filter['page_size'], $filter['start']);$list = array();while ($rows = $GLOBALS['db']->fetchRow($res)){    date_default_timezone_set('PRC');    $rows['reg_time']=date('Y-m-d H:i:s',$rows['reg_time']);    $list[] = $rows;}return array('list' => $list, 'filter' => $filter, 'page_count' => $filter['page_count'], 'record_count' => $filter['record_count']);</code>
Copy after login

}

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template