RedRocky Posted January 13, 2010 Share Posted January 13, 2010 I have a list of records from a database displayed in a table on my web page (using PHP/MySQL). I want to be able to dynamically do the following without having to access the database again: 1) Filter the records (e.g. you enter the surname Smith and only records containing Smith in the surname are displayed), and 2) Sort the records (e.g. by surname, forename etc). I can work out how to do this using Ajax, but even if I am using Ajax, in the background I am still having to access the database again. Is it possible to access the database just once, get all of the records, display the default list of records sorted by a default field, and then allow the user to filter and sort that data without having to reload the data from the database each time? Is it possible to create some sort of dynamic XML file and use that, or is there a better way to do it? Thanks, Stephen Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted January 14, 2010 Share Posted January 14, 2010 Here is an example http://tablesorter.com/docs/ Do keep in mind that if you are using pagination of some sort that ajax would prob be a better solution. Hope it works, Rich Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.