MyBB Community Forums

Full Version: sql query to see how many posts by uid in tid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I assume it's possible to run a query to see how many posts a user had within a thread.

I'd then imagine that same query could be slightly modified to reflect how many posts a user has within a forum.

if so, can someone provide the exact query that needs to be ran?
posts count of a specific user in a specific thread
SELECT count(*) AS postsnum FROM `mybb_posts` WHERE  `tid` = threadID AND `uid` = userID
threadID and userID are numbers (> 0)

posts count of a specific user in a specific forum
SELECT count(*) AS postsnum FROM `mybb_posts` WHERE  `fid` = forumID AND `uid` = userID
forumID and userID are numbers (> 0)
perfect, thanks!