Question:

Php order by function, sorting by different columns

by  |  earlier

0 LIKES UnLike

i want to have people click on the name of the column to order by it.

 Tags:

   Report

2 ANSWERS


  1. You should concentrate on three important regions

    1. ORDER BY (MySQL)

    2. $_GET (PHP)

    3. a href

    Review the above links further to gain more insight.

    If you post more of your code i can provide you with a correct script.


  2. Well how is your data stored? If it is in an SQL database then you can use "ORDER BY x" (or whatever it is... think that's right, haven't used SQL in ages) in the query.

    If it's in some other format then you're going to have to write your own sort function to act on your data set in the format it's in, for that look up quicksort

    http://en.wikipedia.org/wiki/Quicksort

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.