数据库分页实现

分页实现:

主要在于五个变量。

  1. 数据总数(通过sql语句实现)
  2. 页面大小(通过自定义)
  3. 总页数(通过计算,总数 / 页面大小,有余数+1)
  4. 当前页
  5. 当前页的对象集合(比如List<Student> 通过分页sql查数据库)

猜你喜欢

转载自blog.csdn.net/Eeeeearl/article/details/89352508