MyBB Community Forums

Full Version: Merge Multiple Threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I want to merge into one thread about 150 threads all made by the same member.

I know that I cannot do this via the moderation tools nor the ACP but I could via SQL on the database.

I have tested a very simple SQL and it moves all the members posts into their newest thread BUT if any thread had a reply then it leaves those as the posts in the old threads.

So the simple SQL is this below

UPDATE `mybb_posts` SET `tid`=500 WHERE `fid`=2 AND `uid`=100;

where 'tid' is thread number and 'fid' is forum section number and 'uid' is member number.

Now that does what is asked but it does not move all posts within each thread just the posts by the defined member.
So how can I alter it to merge all the posts in 150 threads (all threads made by the same user) into the same users latest/newest thread?

Do any of you have the MyBB used SQL which merges threads please (which maybe I could adapt to merge multiple at the same time)?

Thanks in advance Smile
(2024-02-07, 09:31 PM)lost puppy Wrote: [ -> ]I know that I cannot do this via the moderation tools nor the ACP but I could via SQL on the database.

Yes, you can do this via moderation tools. Avoid doing this directly using direct DB queries.

Create a custom thread moderation tool and then execute it over all the threads you want to merge :

https://docs.mybb.com/1.6/Moderating-Options/ (Down below to "Merge Threads")

You can execute this tool from the search page, if you want to look for one user's threads you can do so by going to their profiles and using the "(Find All Threads)" link found there :

https://mybb18.omarg.me/search.php?actio...eads&uid=1

Look into the attached images for more visual guidance.

Regards.
Thanks for all the information Omar, very good of you Smile

We have the merge set up already but it wouldn't do 150 threads into one!

Could it be the PHP limit?

It is set at 512mb on the server.
I will try and move them in groups of 50 threads and see if that works??
It could be a trouble with MySQL.
I didn't look at the merge code, but sometime queries are aborted (or refused) because there are too much parameters. I had that with a IN() search