Page 1 of 1

Pagination for big sql table results

Posted: Sat Aug 23, 2008 12:36 pm
by Sindarin
I found some nice pagination scripts and I am trying to implement them in my code,

The pagination would be like: http://www.wellho.net/demo/mqchunks.php

but in case there are many results like 500, I'd like to display
1,2,3,4,5,6,7....496,497,498,499,500
not the whole results.
How would I do that?

Re: Pagination for big sql table results

Posted: Sat Aug 23, 2008 4:34 pm
by califdon
Obviously that's possible, and many applications do that, but I always wonder why. Personally, I find that is an ineffective way to paginate, since in most circumstances a user wants to either go from one page to the next or previous, or they want to go to some other random place in the middle, which this practice doesn't allow. I think your solution depends on the kind of data you are displaying and how it is likely to be used. Sometimes there's another search value that can be used, or if not, I think I would show something like:

Code: Select all

<< Prev   *    page |__| of 500  *   Next >>
and let the user specify a page number.

Re: Pagination for big sql table results

Posted: Sat Aug 30, 2008 4:01 am
by Sindarin
I'll probably add something like that as well, but I don't want the page numbers to mess with the layout.