Top Poster in 2008...How do i??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DWDYEM2001
    Senior Member
    • Oct 2002
    • 166

    Top Poster in 2008...How do i??

    How can I figure out which user on my forums was the most active in 2008?
  • Lats
    Senior Member
    • Mar 2002
    • 3671

    #2
    This query will show your top 5 posters for 2008...
    Code:
    SELECT 
     post.username, 
     count( post.postid ) AS postcount
    FROM 
     post
    LEFT JOIN 
     thread 
    ON 
     thread.threadid = post.threadid
    WHERE 
     post.dateline > 1199145600
    AND
     post.dateline < 1230768000
    GROUP BY 
     post.username
    ORDER BY postcount 
     DESC 
    LIMIT 
     5
    Lats...

    Comment

    • DWDYEM2001
      Senior Member
      • Oct 2002
      • 166

      #3
      Lats,

      I appreciate your help...

      I ran that querey and it didn't show anything..

      "Results: 5 (0.0008s), Page 1 of 1"

      That's all that it showed...

      Comment

      • Lats
        Senior Member
        • Mar 2002
        • 3671

        #4
        5 results without anything on the page??

        Okay, try running the same query in phpmyadmin, or remove the vertical spacing and try again in the ACP.
        Lats...

        Comment

        • DWDYEM2001
          Senior Member
          • Oct 2002
          • 166

          #5
          I am not sure how to run it in phpMyadmin...

          I removed the vertical spacing and ran it like this and got the same rults with 5 results and nothing on the page;

          Code:
          SELECT post.username, count( post.postid ) AS postcount
          FROM post
          LEFT JOIN thread 
          ON thread.threadid = post.threadid
          WHERE post.dateline > 1199145600
          AND post.dateline < 1230768000
          GROUP BY post.username
          ORDER BY postcount 
          DESC 
          LIMIT 5

          Comment

          • Lats
            Senior Member
            • Mar 2002
            • 3671

            #6
            Your hosting control panel normally has a link to phpmyadmin however, run this version of the query in the ACP...
            Code:
            SELECT post.username, count( post.postid ) AS postcount FROM post LEFT JOIN thread ON thread.threadid = post.threadid WHERE post.dateline > 1199145600 AND post.dateline < 1230768000 GROUP BY post.username
            ORDER BY postcount  DESC LIMIT 5
            It works although the LIMIT clause is ignored.
            Lats...

            Comment

            • DWDYEM2001
              Senior Member
              • Oct 2002
              • 166

              #7
              Lats,

              I ran the quer y in PHPmyAdmin and it worked.

              Thanks a bunch!!

              Comment

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