Ian wrote:
Thanks for your reply.
What if it was an extra active database and the count changed between looking it up specifically and getting the actual rows?
You can never be sure about that, unless for each page you query the db for the actual # of pages. And even then, it can differ. The # of pages to browse through is an estimate. Even on Google it is. Often there are initially 5 pages, but when you're at page 2, there seem to be only 3 or so. As soon as the user starts the action of 'get me the XYZ rows for september' or something, the action starts, and the # of pages to browse through IMHO should be calculated then, as when the paging logic wasn't used (but all rows were read) the user would get that amount of pages of data as well.