【发布时间】:2014-05-27 04:33:58
【问题描述】:
如何使用查询生成器在 phalcon 中实现此查询(最佳方法):
$results = "select * from table where name like 'A%' limit 10"; // <-- 10 records
$total = "select count(1) from table where name like 'A%'"; // <-- 100 records
return [
'data' => $result,
'total' => $total
];
我是 extjs 用户,我需要总超出限制才能显示分页信息(eq:显示 100 条记录中的 1 到 10)
谢谢。
【问题讨论】: