微擎分页的实现
微擎分页的实现
$page_index = max(1, intval($_GPC['page']));
$page_size = 50;
$page_total = intval(pdo_fetch("SELECT COUNT(*) as cnt FROM ".tablename('pjq'))['cnt']);
$pjqs = pdo_getall('cgc_fd_yuchan_pjq', array(), array(), '', array(), array($page_index, $page_size));
var_dump($pjqs);
$pager = pagination($page_total, $page_index, $page_size);