Forum Moderators: coopster

Message Too Old, No Replies

Alphabetical sorting of DB values

ksort()?

         

ahmedtheking

10:33 am on Jan 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possibile to sort values from a DB alphabetically?

Eg I want all the rows to be sorted alphabetically depending on the title coloum....?

kazecoder

11:39 am on Jan 26, 2005 (gmt 0)

10+ Year Member



SELECT * FROM table ORDER BY column DESC

That should do the trick. You could also use ASC (ascending) depending on which way you want to sort.

StupidScript

5:33 pm on Jan 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ASC is the default.

SELECT * FROM table ORDER BY column

will sort alphabetically A-Z

SELECT * FROM table ORDER BY column DESC

will sort alphabetically Z-A