I have a MySQL table named camp_details which has the following columns :
camp_id, camp_name, location, category, months , pattern 
I have input fields which accepts values for location, category, months and pattern.
Based on the details provided, the table should sort according to the preferences (1:location , 2:Months , 3:pattern and 4:category).
That is, the table should display first containing location, next months and so on.
Kindly help me out in this.
 
     
    