postwhore of the year :D

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dutchbb
    Senior Member
    • Nov 2003
    • 927
    • 3.8.x

    postwhore of the year :D

    Does anyone know how to run a query to find out who has made the most posts in last year (2006). I would like to announce the winners on our board
  • Jan Klerks
    Senior Member
    • Jul 2002
    • 265

    #2
    Sounds like a great banning tool!

    Comment

    • Quillz
      Senior Member
      • Nov 2004
      • 2787
      • 5.0.X

      #3
      I think you could simply list all of your members in the ACP, and then sort by post count.
      Forums

      Comment

      • dutchbb
        Senior Member
        • Nov 2003
        • 927
        • 3.8.x

        #4
        How would that calculate most posts made in the past year?

        Comment

        • Chousho
          Senior Member
          • Jan 2004
          • 967
          • 3.8.x

          #5
          Someone with a little more knowledge could expand this, but you could run a query that selects the user by dates equal or greater to a year ago's date, then ascend it according to post.

          Since I don't have my VB db open, I can't tell you exactly what table or even date format VB uses.

          Comment

          • mlx
            Senior Member
            • Jan 2001
            • 679
            • 3.8.x

            #6
            Try
            Code:
            SELECT COUNT( postid ) AS count, username
            FROM vb3_post
            WHERE dateline > 1136070000 AND dateline < 1167519600
            GROUP BY username
            ORDER BY count DESC
            LIMIT 3
            Planning to continue using VB 3.8 post EOL? Then join the VB 3.8 Forever group and vB3Forever.org!

            Comment

            • dutchbb
              Senior Member
              • Nov 2003
              • 927
              • 3.8.x

              #7
              Originally posted by mlx
              Try
              Code:
              SELECT COUNT( postid ) AS count, username
              FROM vb3_post
              WHERE dateline > 1136070000 AND dateline < 1167519600
              GROUP BY username
              ORDER BY count DESC
              LIMIT 3
              Thanks

              How do you calculate the dateline from a date please?

              -dutch

              Comment

              • MGM
                Senior Member
                • Aug 2002
                • 3653
                • 3.6.x

                #8
                This might help: http://www.phpbuilder.net/columns/akent20000610.php3

                MGM out

                Comment

                • slappy
                  Senior Member
                  • Apr 2003
                  • 1206

                  #9
                  To convert the "dateline" from the "date" you need a "Unix Time Code Converter."

                  There are many of them available on the web. You will find one such at:



                  It will convert a Unix time stamp, such as: 1136070000 to its calendar equilivant of "at, 31 Dec 2005 23:00:00 UTC"

                  and back the other way, with a place to enter any date you want and it will give you the Unix Time Code equilivant for your query.

                  Try "converting date to Unix timestamp" (without the quote marks) in your favorite search engine and you will find several similar tools available online.

                  Regards,
                  Slappy

                  Comment

                  • dutchbb
                    Senior Member
                    • Nov 2003
                    • 927
                    • 3.8.x

                    #10
                    Thanks slappy

                    Comment

                    • Chousho
                      Senior Member
                      • Jan 2004
                      • 967
                      • 3.8.x

                      #11
                      If you want the date through a php file on your own server, try:

                      date("M d, Y", $date)

                      where $date is the Unix stamp.

                      Comment

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