No announcement yet.

Finding total posts in a specific forum

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:
    SELECT COUNT(postid) AS count
    FROM vb_post
    WHERE forumid = '671'
    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:,,, and

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


    • #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.

      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 - Full / Mobile
      Vote for your favorite feature requests and the bugs you want to see fixed.


      • #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:,,, and


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