niiki-lou Posted July 14, 2009 Share Posted July 14, 2009 Hey guys, Just wonder on how i would go about working out the top ten posters on my little forum script in my table i have this Field Type Collation Attributes Null post_id int(250) No author text latin1_swedish_ci Yes post_body text latin1_swedish_ci Yes post_date text latin1_swedish_ci Yes thr_id text latin1_swedish_ci Yes for_id int(250) No So from my guess ill need to get author from table forum_posts but thats as far as my guess goes ive had a hunt on google but im not sure were i go from here.. Any help is really greatfull. Quote Link to comment https://forums.phpfreaks.com/topic/165951-top-10-posters/ Share on other sites More sharing options...
rhodesa Posted July 14, 2009 Share Posted July 14, 2009 SELECT author, COUNT(*) numPosts FROM tableName GROUP BY author ORDER BY numPosts DESC LIMIT 10 Quote Link to comment https://forums.phpfreaks.com/topic/165951-top-10-posters/#findComment-875269 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.