www.webdeveloper.com
Results 1 to 9 of 9

Thread: Organising data

  1. #1
    Join Date
    Nov 2006
    Posts
    172

    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

  2. #2
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    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.

  3. #3
    Join Date
    Oct 2005
    Posts
    46
    Quote 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?

  4. #4
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    Quote 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.)

  5. #5
    Join Date
    Jun 2006
    Location
    Down at the bottom of the garden
    Posts
    1,239
    I would use AJAX for this, but I love Javascript RPC calls.

    Who needs $_GET variables when you have sessions

  6. #6
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    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...

  7. #7
    Join Date
    Jun 2006
    Location
    Down at the bottom of the garden
    Posts
    1,239
    Quote 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?

  8. #8
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    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?

  9. #9
    Join Date
    Nov 2006
    Posts
    172
    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
  •  
HTML5 Development Center



Recent Articles