AndreaMarucci
Well-known member
I'd like to know if there's a way to exclude certain forums from the total number of messages of each member.
I've one forum devoted to chitchat and it's widely used but I don't want that all the messages posted here count towards the number of messages of each user.
I've also seen that from @Jake Bunce
where I can input the ID of the forum I don't want to count...
Can I use this one or there's a better way to do that?
I've one forum devoted to chitchat and it's widely used but I don't want that all the messages posted here count towards the number of messages of each user.
I've also seen that from @Jake Bunce
Code:
UPDATE xf_user AS user
SET message_count = (
SELECT COUNT(*)
FROM xf_post AS post
LEFT JOIN xf_thread AS thread ON (thread.thread_id = post.thread_id)
WHERE post.user_id = user.user_id
AND thread.node_id NOT IN (1,2,3)
AND post.message_state = 'visible' AND thread.discussion_state = 'visible'
GROUP BY post.user_id
);
Can I use this one or there's a better way to do that?
Last edited: