Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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
share|improve this question

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.

share|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

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!

share|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

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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