I have mysql table and I want to sort that data, eg by time
Column1 Column2 Column3
take these three columns(pretend there mysql table columns lol). I would like to sort column 3 alphabetically, of course the entire table would sort with the data moving around in column three. eg. column1 row1 has PHPGuru in it column2 row1 has password in it..
id like to keep those data pieces in the same row lol
im sry im not doing so well to explain.
Thanks In Advance!
SELECT culumn1, culumn2, culumn2 FROM table1 ORDER BY culumn1 DESC;
DESC means descentent.
If you want to sort your username field (e.g field1) alphabetically don't use DESC, because it will reverse the row.
SELECT field1,field2,field3 FROM table_name ORDER BY field1;
btw, I prefer "field" than "column" 😉
hope you got the point.. 🙂