MyBB Community Forums

Full Version: Merge 2 Tables ! [Important]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys .

I used Prune Members Plugin & lost many users of my forum . But I have backup . Now I want to merge two users tables (one of them is current DB & other one is backup DB)

Thanks .
Well there is no universal tool for this though it is possible. what you want to do is work in a database other than the one your forum is in.

1) Using phpMyAdmin export the two tables to merge with data only. Uncheck the structure tab. Also, check the tab under Data that says "User ignore inserts" this is going to stop MySQL from throwing errors for duplicates.

2) Dump the structure of the table with no data.

3) Import this table into the new database that does NOT contain your forum.

4) Import table 1's data into the new table.

5) Import table 2's data into the new table.

6) Look over the data make sure it looks correct and then dump the new table data and structure.

7) Drop the table on your Forum database and import the new one. You should be set.

Now always make backups when dealing with your data. Any more questions let me know.
Thanks a lot Nullivex !

Can you make screenshots of your explanation please ?

Thank you .
Why did you prune members that you didn't want to prune? Gotta ask that since my plugins purpose is to delete members that are inactive. They either have zero posts OR they have never activated their account. So what results were you expected? Did you just not realize how many members would be deleted?
Thanks Labrocca . Your plugin is great , but I used DenisTT plugin & got this porblem .

@Nullivex : Don't need to screenshot , I did that. Thanks again .
No problem mate, glad I could help.
Ahh...was wondering. Yeah I made mine because I just needed something that pruned zero post and unactivated members. DenisTT's is vicious and will delete a whole slew of things including PMs and Posts.
If it's a recent backup I suggest you just empty/truncate the current table, and reimport it from your backup.
Reference URL's