Announcement

Collapse
No announcement yet.

Finding total posts in a specific forum

Collapse
X
  • 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:
    Code:
    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: http://forums.opensuse.org, http://forums.microfocus.com, http://forums.netiq.com, and http://forums.suse.com

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

    Comment


    • #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 customization and demonstration site.
      vBulletin 5 Documentation - Updated every Friday. Report issues here.
      vBulletin 5 API - Full / Mobile
      I am not currently available for vB Messenger Chats.

      Comment


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