Organising data
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
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.
Originally Posted by
NightShift58
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?
Originally Posted by
Sam Granger
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.)
I would use AJAX for this, but I love Javascript RPC calls.
Who needs $_GET variables when you have sessions
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...
Originally Posted by
NightShift58
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?
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?
any body know of any tutorials where i can find out more
its 11:31am here
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks