|
Highest Values
Hi can anyone tell me how to display the top 3 fields from a MySQL database in order of highest number
I have a voting system like so:
id---total_votes---total_value
1 -------- 3 -------- 23
2 -------- 2 -------- 42
3 -------- 6 -------- 10
4 -------- 2 -------- 9
5 -------- 1 -------- 11
I want it to display the top 3 total_value fields which in this case would be:
ID 2, 3 and 5
Can anyone help?
Thanks
Robert
|