UseBB Community

The official board for UseBB help and discussion

UseBB Community » Help & Support » Restoring user postcount

Restoring user postcount

Moderators: Gaia.

Page: 1

Author Post
Member
Registered: May 2005
Posts: 10
Location: Brugge
Hello

I changed some of my users' postcounts, manually in the database. What is the best way to restore this?

A query to calculate the postcount of every user should do the trick, then I can manually enter the correct postcounts in the database again.

Thanks in advance.
_______________
Beter een half spreekwoord
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
SELECT poster_id, COUNT(*) as posts
FROM usebb_posts
WHERE poster_id IN(1, 2, 3)
GROUP BY poster_id

IN() containing the user ID's of the members you want to count the posts for.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: May 2005
Posts: 10
Location: Brugge
This query should return the postcount for members named 1, 2 and 3, right?

Thanks.
_______________
Beter een half spreekwoord
Moderator
Registered: Oct 2005
Posts: 437
Location: canada
Yes it would.

Page: 1

UseBB Community » Help & Support » Restoring user postcount

UseBB Community is powered by UseBB 1 Forum Software