• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Resource icon

Rebuild user post counts (query)

This will recalculate and update the post counts for all users at once. This is a large query that may take a while to finish.

Rich (BB code):
UPDATE xf_user AS user
SET message_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
You do not have permission to view the full content of this resource. Log in or register now.
Jake Bunce
First release
Last update
5.00 star(s) 1 ratings

More resources from Jake Bunce

Latest reviews

A very useful query when you use borbole's query to move guests threads and post to a xenforo user since borbole's query won't update the thread counters.