Does anyone know of a link to a site that has a tutorial/code on good way to paginate information coming from a database? (without page refresh) I have spent the better part of the day looking for a site that has what I need. Most are dealing with static/fixed data in the forms of lists etc. I need one that has something like this for my tables:

Data          Data          Data          Data          

Data          Data          Data          Data          


Records 1 to 8 of 27  First  Previous Next Last
link|improve this question

feedback

3 Answers

up vote 1 down vote accepted

We just implemented a few things using this plugin for JQuery:

Datatables.net

It works on basic html tables and has support for AJAX. Basically you would just write a PHP page that returns a partial result from your database in JSON, etc. The plugin will handle making the AJAX call and displaying the data.

link|improve this answer
Thanks for the reply. Im checking it out – Kinyanjui Kamau Feb 8 '11 at 19:46
I think this page even has some sample PHP. – Shea Daniels Feb 8 '11 at 21:17
feedback

This is only a very partial answer (sorry, not much time atm) but look for the 'LIMIT' command in mysql. It lets you pull back only a certain set of records, say records 11-20. I use that when I do pagination.

Again, this isn't complete, but hopefully it'll help!

link|improve this answer
Thanks for they reply. Unfortunately that is not the problem. I guess I'm looking for a jQuery,Ajax plugin or tutorial – Kinyanjui Kamau Feb 8 '11 at 19:44
feedback

I've worked with this one quite a bit. jQgrid... seems to be pretty well maintained. http://www.trirand.com/blog/

link|improve this answer
Thanks. Ill check it out – Kinyanjui Kamau Feb 8 '11 at 20:02
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.