YAFLogo

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
11 years ago
I deleted a an topic, though MSSQL manager studio (the topicx had >13,000 posts, so the 'usual way' was timing out every 50 posts or so)

running YAF 1.9.5.5. btw

now all our member's post counts are way off

Is there a way to force YAF to recalculate all user's post counts?


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

Sponsor
squirrel
11 years ago
I think I had a script at one time that would do it (had to have it for a Snitz migration we did. I'll see if I can find it for you --

It loops through all the user records, and tallies their posts and re-stores the value on the user record --


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
11 years ago
UPDATE
    yaf_User
SET
    yaf_User.NumPosts = (SELECT COUNT(yaf_Message.MessageID)
FROM
    yaf_Message 
WHERE 
    yaf_User.UserID = yaf_Message.UserID and yaf_Message.IsDeleted = 0);
RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
11 years ago
That sorted it; many thanks
Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com