페이지 나누기(조회된 데이터에 대해 페이지 나누기 표시)
public List<Book> queryBookList2(String name, int pageNo, int pageSize) throws SQLException {
QueryRunner queryRunner = new QueryRunner(C3P0Utils.getDataSource());
String sql="select * from book where bookname LIKE ? limit ?,?";
List<Book> list = queryRunner.query(sql, new BeanListHandler<Book>(Book.class),"%"+name+"%",(pageNo-1)*pageSize,pageSize);
return list;
}
이것은 모호한 조회이기 때문이다.