Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
usgroup1
New Member
New Member


Joined: Aug 21, 2005
Posts: 2

PostPosted: Sun Aug 21, 2005 2:51 pm Reply with quote

(sorry for my english)

some of the forums post got deleted so I restored db from the backup. I restored these tables from the backup and restored forums posts successfully.

nuke_bbposts
nuke_bbposts_text
nuke_bbtopics
nuke_bbvote_desc
nuke_bbvote_results
nuke_bbvote_voters

I did want to keep my new users in nuke_users so I just left it unchanged but now users post count have been shown incorrectly. I think it's because it is in user_posts in nuke_users table. how can I resync this filed to the real number of user posts. maybe it can be done with a query or maybe a script. is there any ..?
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Sun Aug 21, 2005 5:13 pm Reply with quote

Not that i know of,if you delete posts then you can only restore it when you have a complete backup..
But that means you have to replace all related to the forums..
Otherwise you see member A has 23 posts but nowhere to be found,or the other way around.
Thats the risk...
Or alter the members post manual...but that can be fun if you have a few thousand posts... Twisted Evil
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Sun Aug 21, 2005 9:17 pm Reply with quote

usgroup1, I put this together for you. Make sure that you backup your nuke_users table! Even though I tested this and it seemed to work for me, I take no responsibility in any disasters :LOL:

Use phpMyAdmin and execute this query exactly as written, in the SQL window
Code:
CREATE temporary table tmppostcount as (select poster_id, count(poster_id) count from nuke_bbposts group by poster_id);


UPDATE nuke_users u, tmppostcount t SET u.user_posts=t.count
WHERE u.user_id = t.poster_id
 
View user's profile Send private message
usgroup1
PostPosted: Mon Aug 22, 2005 12:50 am Reply with quote

it worked perfect. thank you Raven
 
hitwalker
PostPosted: Mon Aug 22, 2005 3:35 am Reply with quote

nice fix raven....this should be a sticky one...
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©