Is there a way to know an indivual user's total number of posts for each forum?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tombot
    New Member
    • Mar 2004
    • 15
    • 3.6.x

    Is there a way to know an indivual user's total number of posts for each forum?

    Is there a way to see how many total posts a user has in a specific forum? I don't mean how many threads they've posted to in that forum, but actual total posts. If there is, I sure can't find it.

    Thanks in advance if you can help.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    You can get that number by running this query on your database:

    SELECT count(*) AS count FROM post LEFT JOIN thread ON (thread.threadid = post.threadid) WHERE thread.forumid=X AND post.userid=Y

    Where X is the forumid and Y is the userid of the user. If you use table prefixes then you need to change the various instances of post and thread to include the prefix.

    You can run this query in your:

    Admin CP -> Import & Maintenance -> Execute SQL Query

    You must have permission to execute queries in your includes/config.php file:

    // ****** USERS WITH QUERY RUNNING PERMISSIONS ******
    // The users specified here will be allowed to run queries from the control panel.
    // See the above entries for more information on the format.
    // Please note that the ability to run queries is quite powerful. You may wish
    // to remove all user IDs from this list for security reasons.
    $canrunqueries = '';

    Comment

    • tombot
      New Member
      • Mar 2004
      • 15
      • 3.6.x

      #3
      Thanks Jack!!

      Comment

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