PHP sorting script help

Discussion in 'PHP' started by ancientcity, Dec 28, 2008.

  1. #1
    hi all

    ok im quit new to php codes! so be nice! :)

    ok im trying to find a sorting script, that can display data from a database and allow the user to sort it,

    i have google yahoo and every thing no such luck!

    can any of you PM me a link or give me some good information to get one!?

    cheers
    ancientcity
     
    ancientcity, Dec 28, 2008 IP
  2. pepeRu

    pepeRu Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    well you can use sql itself to sort the data, that will be the easiest and most efficient thing to do...

    google for "ORDER BY" for more info, apparently i can't post links yet...

    if you want an example supply me with a snippet and i'll gladly make you an example...
     
    pepeRu, Dec 28, 2008 IP
  3. hackfanatic

    hackfanatic Peon

    Messages:
    29
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I think he wants to allow the user to be able to sort the result..

    hm.. i would use jquery sortable in this condition..

    use php to populate the elements to be sorted.

    http://ui.jquery.com/repository/tags/latest/demos/functional/#ui.sortable

    use the callback to post it to a php file which would take the array and put it back in the database.

    Depends on how comfortable you are with js and php. use trial and error and try to get it to work ;)
     
    hackfanatic, Dec 29, 2008 IP
  4. ancientcity

    ancientcity Well-Known Member

    Messages:
    130
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    123
    #4
    ancientcity, Dec 29, 2008 IP