Finding total posts in a specific forum

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kgroneman
    Senior Member
    • Aug 2007
    • 179

    Finding total posts in a specific forum

    I want to find the number of total posts in a specific forum. It's easy to find number of threads, but I'm having a hard time finding posts. I tried this sql query:
    Code:
    SELECT COUNT(postid) AS count
    FROM vb_post
    [FONT=monospace]WHERE forumid = '671'[/FONT]
    But forumid isn't a column in vb_post. Can someone tell me how to find total posts in a forum? Thanks in advance.
    Our forums: http://forums.opensuse.org, http://forums.microfocus.com, http://forums.netiq.com, and http://forums.suse.com
  • Bat21
    Senior Member
    • Jan 2003
    • 291
    • 4.2.X

    #2
    Isn't this one of the options that can be displayed by simply choosing it from the adminCP.

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 74123

      #3
      This should show on your front page in the forum listing. However...

      You would have to join in the `thread` table on the threadid.

      Code:
      SELECT COUNT(p.postid) AS count
      FROM vb_post AS p
      JOIN vb_thread AS t ON (p.threadid=t.threadid)
      WHERE t.forumid = '671'
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment

      • kgroneman
        Senior Member
        • Aug 2007
        • 179

        #4
        Somebody needs to kick me. I'm so used to working from the back end I forget to look at the front end! LOL! Pretend I wasn't even here......
        Our forums: http://forums.opensuse.org, http://forums.microfocus.com, http://forums.netiq.com, and http://forums.suse.com

        Comment

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