currentPage = (currentPage - 1) * rows;
收起
由于题主没有给出上下文信息,这里只能做出推测,currentPage 的值从 1 开始,由客户端传入,表示分页的页码,rows 表示每页有多少条数据,(currentPage - 1) * rows 用于计算数据库分页时跳过多少条数据,然后再赋值给 currentPage 以便在 SQL 中分页达到 limit currentPage,rows 的目的。
currentPage
rows
(currentPage - 1) * rows
limit currentPage,rows
报告相同问题?