Page 1 of 1

Sorting and echoing from db

Posted: Thu Sep 23, 2010 3:01 pm
by tonchily
So, I got the following fields in my db:
name, number

and I have 15 entries as it follows:
John, 15
Jamie, 11
Jessica, 24
Jaspergod, 51
Tony, 33
Michael, 51
Ninna, 55
Anamaria, 66
Alison, 54
Andrzej, 61
Leslie, 26
Trevor, 86
Wayne, 42
Abraham, 21
Morris, 95

and I want to echo out the top5 names sorted by numbers descending. How can I do that? Thank you.

Re: Sorting and echoing from db

Posted: Thu Sep 23, 2010 4:34 pm
by tonchily
Nevermind, the "LIMIT" did it all.