Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 176
Total: 176

Author Topic: Top X List  (Read 671 times)

0 Members and 1 Guest are viewing this topic.

Offline PapaFrizArcade

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Top X List
« on: March 25, 2022, 06:35:59 pm »
How hard would it be to do a TOP X LIST (Top 10 List for example) of those with the most badges and the number of badges for each?

I would like to create a "Top 10 Badge-Whores" list ... either in a portal block or in the info center or what not.

Doable with little fuss by chance?


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Top X List
« Reply #1 on: March 25, 2022, 10:07:42 pm »
Here is the SQL query to do it.
Code: [Select]
select count(l.id_member) as totalbadges,l.id_member, m.real_name from (smf_badgeawards_badge_log  as l, smf_badgeawards_badges as b)
LEFT JOIN smf_members as m ON  (m.id_member = l.id_member)
where b.id_badge = l.id_badge group by l.id_member order by totalbadges desc  limit 10
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
5301 Views
Last post August 07, 2009, 09:56:31 pm
by ApplianceJunk
0 Replies
3177 Views
Last post August 07, 2009, 10:59:08 pm
by ApplianceJunk
9 Replies
12646 Views
Last post September 19, 2013, 04:24:37 pm
by SMFHacks
5 Replies
5662 Views
Last post June 02, 2010, 01:05:41 pm
by Tom
5 Replies
2303 Views
Last post December 02, 2022, 06:23:53 am
by Monocero

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal