Top Posters Per Month

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Michael2
    Senior Member
    • Oct 2001
    • 1027
    • 3.8.x

    Top Posters Per Month

    I think I'm missing something... Is there a way to list the top posters during a given time period? I don't need it to display on the board, just need to look it up myself.
    HBO Forum - Discuss Game of Thrones, True Blood, Big Love, Boardwalk Empire, and more!
    Disney Forums - Disney theme parks, vacation, entertainment, and more!
    iLoveTalk - Our general discussion forum.
    VeggieBoards - The largest and most active vegetarian forum!
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    You can use something similar to this, but modify it for the last month:

    Code:
    SELECT COUNT(post.postid) AS count, user.username
    FROM user AS user
    LEFT JOIN post AS post ON (post.userid = user.userid)
    WHERE post.dateline > UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 MONTH))
    GROUP BY post.userid
    ORDER BY count
    DESC
    Or you can use this format to specify two bounds instead of starting from "today":

    Code:
    SELECT COUNT(post.postid) AS count, user.username
    FROM user AS user
    LEFT JOIN post AS post ON (post.userid = user.userid)
    WHERE post.dateline > UNIX_TIMESTAMP('yyyy-mm-dd 00:00:00')
    AND post.dateline < UNIX_TIMESTAMP('yyyy-mm-dd 00:00:00')
    GROUP BY post.userid
    ORDER BY count
    DESC

    Comment

    • vietkieu_cz
      Member
      • Dec 2005
      • 51
      • 3.6.x

      #3
      Hi Jake Bunce,
      I've run that queries but still don't know how to show them on the forum?

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Custom code is required to put the records into an HTML format for display on your forum pages. I recommend you post on www.vbulletin.org about this.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...