标签:pac 执行 color 查询 border alt cin strong 新建
例如,我们新建一张表如下:

执行 select * from products limit 4;

就会对结果进行限制输出。为了显示剩下的,
执行 select * from products limit 4,4;

它表示从行4往后取4行。
select * from xx limit x,y
y表示当前页面显示几条记录。
x与当前页码有这样的关系:x=(当前页码-1)* y.
例如:50条数据分10页,每页5个,
使用sql 语句来限制输出:
| 第i页 | x | y |
| 1 | 0 | 5 |
| 2 | 5 | 5 |
| 3 | 10 | 5 |
按照这样的关系就可以实现分页了!
标签:pac 执行 color 查询 border alt cin strong 新建
原文地址:https://www.cnblogs.com/liu-chen/p/11804146.html