Who has the most vistor messages on their profile?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pgowder
    Senior Member
    • Mar 2001
    • 832

    Who has the most vistor messages on their profile?

    What would be the query to determine that?

    Thanks!
    PowWows.com
  • Lats
    Senior Member
    • Mar 2002
    • 3671

    #2
    Try this...
    Code:
    SELECT 
        user.username, 
        count( visitormessage.vmid ) AS vmcount
    FROM 
        visitormessage
    LEFT JOIN 
        user ON visitormessage.userid = user.userid
    GROUP BY 
        user.username
    ORDER BY 
        vmcount DESC 
    LIMIT 
        20
    Lats...

    Comment

    • pgowder
      Senior Member
      • Mar 2001
      • 832

      #3
      Thanks!

      Try running this via vB Control Panel - no results.
      PowWows.com

      Comment

      • Lats
        Senior Member
        • Mar 2002
        • 3671

        #4
        Try the alternative - phpmyadmin
        Lats...

        Comment

        • Dilly
          Senior Member
          • Mar 2005
          • 1812

          #5
          Won't make a difference.

          Did you add your table prefix in?

          Comment

          • Nick
            Senior Member
            • Feb 2008
            • 3507
            • 3.8.x

            #6
            Originally posted by Dilly
            Won't make a difference.

            Did you add your table prefix in?
            Surprisingly, it actually would make a difference. http://www.vbulletin.com/forum/showthread.php?t=289226
            Regards,
            Nick

            Comment

            • Dilly
              Senior Member
              • Mar 2005
              • 1812

              #7
              In that case, it's a bug.

              Comment

              • David Grove
                Senior Member
                • Apr 2008
                • 3507
                • 5.5.x

                #8
                Reported.
                ~~~~~

                Comment

                • Lats
                  Senior Member
                  • Mar 2002
                  • 3671

                  #9
                  The query works just fine in the ACP, without the vertical spacing. I just post it like that for clarity.
                  Lats...

                  Comment

                  • David Grove
                    Senior Member
                    • Apr 2008
                    • 3507
                    • 5.5.x

                    #10
                    Yes, vBulletin does some manipulation of the query string before execution, but the newlines cause their manipulation to fail in some cases.
                    ~~~~~

                    Comment

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