微擎分页
作者:互联网
$tcate = $_GPC['cate']; $page = ((!(empty($_GPC['page'])) ? intval($_GPC['page']) : 1)); $pagesize = ((!(empty($_GPC['pagesize'])) ? intval($_GPC['pagesize']) : 10)); $p= ($page-1)*$pagesize; $total = pdo_fetchcolumn('select count(id) from '.tablename('ewei_shop_goods')."where tcate= '$tcate' and status = 1"); $goods = pdo_fetchall("select id,title,thumb,productprice,marketprice,total from ".tablename('ewei_shop_goods')."where tcate= '$tcate' and status=1 order by displayorder LIMIT $p,$pagesize"); $pager = pagination($total, $page, $pagesize);
$page 是页码
$pagesize 是页面容量
$taotal 是页面总数
标签:tcate,goods,分页,pagesize,GPC,微擎,total,page 来源: https://www.cnblogs.com/xiong-hua/p/12626522.html