mysql 分页 limit offset,limit
pageNo 1; pageSize2
offset = (pageNo - 1) * pageSize; =0;
limit = pageSize = 2;
eg : limit 0,2 ->结果从0开始2条数据,0是第一条数据.
limit 2,2 ->结果从索引2开始2条数据,2是第三条.
orcal分页
pageNo 1; pageSize2
BEGINRN (currentPage*pageSize)-pageSize; ->0
ENDRN ->currentPage*pageSize ->2
pageNo 2;pageSize2
BEGINRN 2
ENDRN 4