FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

MySQL Select

 


minik
I want to select some data from database but instead of displaying it as:
1
2
3

I want it

3
2
1

Is it possible to select it backwards?
MrBlueSky
You can use ORDER BY ... DESC.

For example:

Code:

SELECT name, birth FROM pet ORDER BY birth DESC;


See: http://dev.mysql.com/doc/refman/4.1/en/sorting-rows.html
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.