Showing posts with label pages count pagination sql. Show all posts
Showing posts with label pages count pagination sql. Show all posts

Tuesday, January 24, 2012

How to calculate the number of pages for search results

Imagine we have some records in our database, and we want to show them separately, divided in pages. Under the list we want to show hyperlinks to the next and previous pages. In the previous artice Long list pagination in Java I explained how to make Pagination. But for the pagination to work we need to know total number of rows. There are several techniques that are suitable in different situations.