Resetting stats

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Bullfn33
Registered User
Posts: 92
Joined: Mon Jan 29, 2007 2:29 am

Resetting stats

Post by Bullfn33 »

I had to move a new forum to another site directory and I'm trying to reset the post stats(there were a few test posts made) and stats section back down to zero. I've got a couple of the stats section down to zero searching through some tables but I can't find how to reset "Total members", which should be 1(the Admin), as it still says 3.

Then I need the "Announcements" and "The Stadium" forums to zero out the topics, posts and last posts columns.

You can see what I mean here: http://www.cfbpredictions.com/joom1/forum/

Any help is appreciated. Thanks!

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51355
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Resetting stats

Post by stevemaury »

Do you want to get rid of all the posts and topics or just set their count to 0?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Bullfn33
Registered User
Posts: 92
Joined: Mon Jan 29, 2007 2:29 am

Re: Resetting stats

Post by Bullfn33 »

I already deleted the topics and posts, I just wanted to reset the topics and post numbers to zero and reset the Total members to 1. I thought they would reset themselves when I deleted the posts, topics and members but I guess not.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51355
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Resetting stats

Post by stevemaury »

How did you delete them?

Anyway, this SQL should do it:

Code: Select all

TRUNCATE phpbb_posts;
TRUNCATE phpbb_topics;
TRUNCATE phpbb_topics_posted;
UPDATE phpbb_users SET `user_posts` = 0 WHERE `user_id` > 1;
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Bullfn33
Registered User
Posts: 92
Joined: Mon Jan 29, 2007 2:29 am

Re: Resetting stats

Post by Bullfn33 »

Code: Select all

TRUNCATE phpbb_posts;# MySQL returned an empty result set (i.e. zero rows).
TRUNCATE phpbb_topics;# MySQL returned an empty result set (i.e. zero rows).
TRUNCATE phpbb_topics_posted;# MySQL returned an empty result set (i.e. zero rows).
UPDATE phpbb_users SET `user_posts` =0 WHERE `user_id` >1;# Affected rows: 1
It didn't show any changes in the front end. The empty results are probably because I already did this manually.
How did you delete them?
I deleted them through the tables, at least I'm pretty sure I did. At first, I tried to just delete them with the Admin in the front end but it didn't work right. I think something is screwy because I copied the phpbb3 folder into another directory(the new site) and deleted the old site's directory which had the previous phpbb folder.

Don't worry about it. I'm just going to completely reinstall phpbb3 into the right directory and everything should be fine. Thank you for your help!

Locked

Return to “[3.0.x] Support Forum”