karimali831 Posted September 11, 2010 Share Posted September 11, 2010 Hi I've got a table and each user has their own points. For example: user 1: 254 user 2: 118 user 3: 64 ... user 54: 85 I want to be able to find the top 10 users that has most points. How can I achieve this? Thanks for any help. Quote Link to comment https://forums.phpfreaks.com/topic/213102-getting-maxes/ Share on other sites More sharing options...
mikosiko Posted September 11, 2010 Share Posted September 11, 2010 Use ORDER BY DESC and LIMIT clauses Quote Link to comment https://forums.phpfreaks.com/topic/213102-getting-maxes/#findComment-1109822 Share on other sites More sharing options...
fortnox007 Posted September 11, 2010 Share Posted September 11, 2010 This is a website i use pretty often for both php, ajax and sql, and in the past xhtml and css, its pretty awesome: http://www.w3schools.com/sql/sql_orderby.asp Quote Link to comment https://forums.phpfreaks.com/topic/213102-getting-maxes/#findComment-1109823 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.