zylstra
11-20-2016, 09:57 PM
Here are some useful MySQL queries if you want to find and move your orphan threads to a forum where you can moderate them further.
Find:
SELECT thread.*
FROM thread
LEFT JOIN
forum as forum
ON (forum.forumid = thread.forumid)
WHERE ISNULL(forum.forumid)
Move to forum 490:
UPDATE thread
LEFT JOIN
forum
ON forum.forumid = thread.forumid
SET thread.forumid = 490
WHERE ISNULL(forum.forumid)
Or, if you would like to move threads that exist in forums that are disallowed to contain threads:
Find:
SELECT thread.threadid, thread.forumid, forum.title, thread.visible
FROM thread AS thread
LEFT JOIN
forum as forum
ON (forum.forumid = thread.forumid)
WHERE NOT (forum.options & 4)
Move from orphan status to forum number 491:
UPDATE thread
LEFT JOIN
forum
ON forum.forumid = thread.forumid
SET thread.forumid = 491
WHERE NOT (forum.options & 4)
Find:
SELECT thread.*
FROM thread
LEFT JOIN
forum as forum
ON (forum.forumid = thread.forumid)
WHERE ISNULL(forum.forumid)
Move to forum 490:
UPDATE thread
LEFT JOIN
forum
ON forum.forumid = thread.forumid
SET thread.forumid = 490
WHERE ISNULL(forum.forumid)
Or, if you would like to move threads that exist in forums that are disallowed to contain threads:
Find:
SELECT thread.threadid, thread.forumid, forum.title, thread.visible
FROM thread AS thread
LEFT JOIN
forum as forum
ON (forum.forumid = thread.forumid)
WHERE NOT (forum.options & 4)
Move from orphan status to forum number 491:
UPDATE thread
LEFT JOIN
forum
ON forum.forumid = thread.forumid
SET thread.forumid = 491
WHERE NOT (forum.options & 4)