Resource icon

Rebuild User Post Counts (query)

Compatible XF 2.x versions
  1. 2.0
  2. 2.1
  3. 2.2
This is a query which updates user post counts. It takes into consideration moderated and deleted status of threads and posts, as well as each forum's "Count messages posted in this forum toward user total" setting.

Code:
UPDATE xf_user AS user SET message_count =
COALESCE(
 (
        SELECT COUNT(*)
        FROM xf_post AS post
        INNER...
You do not have permission to view the full content of this resource. Log in or register now.
Author
MySiteGuy
Views
865
First release
Last update
Rating
0.00 star(s) 0 ratings
Top