tags:

views:

38

answers:

1

Hi all, Here is my doubt in brief. I am having a drop down box with some values like Artist, Song, Album, Composer, Writer. My problem is When i click on the Artist i need to display the list of artists in ASC order and When i click the same i need to display it in DESC order.

How is this possible to do ?

Thanks in Advance

Fero

+1  A: 

If you're getting the data from a database like MySQL, you want:

SELECT * FROM artists ORDER by artist_name DESC

Or, to sort them ascending:

SELECT * FROM artists ORDER by artist_name ASC

Or, you could do it in JavaScript (e.g. this tutorial).

Without more details of how you're getting the data, it's a bit hard to help you more.

Dominic Rodger