Jump to content

Sorting and filtering data without having to keep accessing the database


RedRocky

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.