View Single Post
  #2 (permalink)  
Old 12-21-04, 10:46 PM
xtremenw xtremenw is offline
Newbie Coder
 
Join Date: Dec 2004
Location: Tacoma, WA
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by robbydweb
I have a mysql database of entries with one column having a number value called score.
is there sql command or a way to take the top 5 scores from the database and display them into an array?
"select value, score from table order by score desc limit 0,4"

try the above. i am not very good with asc or desc, so you might need to switch it. Also, 0,4 should show 5 entries... Also, replace value & score & table with the correct information for your sql table.
Reply With Quote