Click to See Complete Forum and Search --> : Organising data
Marcus Maximus
03-07-2007, 04:38 PM
i have a download page which displays all blobs in my database table that can be downloaded by a user which is displayed alphabetically by description but i know want to be able to click the heading of the table columns and organise the data according to date name type etc will this require querying the database each time
NightShift58
03-07-2007, 10:51 PM
In PHP, yes.
If you were to store all that information in javascript arrays, you can probably move things around without a trip to the server and back.
Sam Granger
03-08-2007, 03:07 AM
In PHP, yes.
If you were to store all that information in javascript arrays, you can probably move things around without a trip to the server and back.
However if there are pages of results, its probably worth going to the server and back, correct?
NightShift58
03-08-2007, 04:32 AM
However if there are pages of results, its probably worth going to the server and back, correct?My answer should be understood within the context of the question asked, which pertained to the data already on the page.
If there are more pages, each additional page would have to be dealt in the same way, but separately (additional DB query, etc.)
MrCoder
03-08-2007, 05:02 AM
I would use AJAX for this, but I love Javascript RPC calls.
Who needs $_GET variables when you have sessions :)
NightShift58
03-08-2007, 05:10 AM
I think you landed in the wrong thread :)
And if not, then maybe I did, as I have no idea as to what you are referring to...
MrCoder
03-08-2007, 05:16 AM
I think you landed in the wrong thread :)
And if not, then maybe I did, as I have no idea as to what you are referring to...
Use AJAX calls to update the table with the correctly ordered version.
While doing this store the current page and ordering details within a session.
What did you think I meant?
NightShift58
03-08-2007, 05:23 AM
I wasn't sure because it didn't seem related to the original theme.
But, to use AJAX, you need javascript. So, if you have javascript and you already have the data, why go back to the server?
For the next page, you have to go to the server - whether PHP or AJAX - so stick to PHP/javascript.
It's 5:22 a.m. Where do you guys all pop in from?
Marcus Maximus
03-08-2007, 05:30 AM
any body know of any tutorials where i can find out more
its 11:31am here