SQL to move threads in bulk? - 10/02/2003 7:05 AM
I'd like to move every thread from one board to another that matches a certain string in the Subject. The SQL command would be something like:
UPDATE w3t_Posts
SET B_Board = 'newboard'
WHERE B_Board = 'oldboard'
AND B_Subject LIKE '%string%'
But then looking at the domovethreads script I realised it's much more involved than that (need to check favorites, etc). And actually, I realised that if a post within a thread has its subject changed such that it won't match the 'string' then that post won't be moved, resulting in a broken thread.
So, I'm after any suggestions on how to go about moving threads in bulk based on some criteria?
I'm using version 6.2.3.
Cheers.
UPDATE w3t_Posts
SET B_Board = 'newboard'
WHERE B_Board = 'oldboard'
AND B_Subject LIKE '%string%'
But then looking at the domovethreads script I realised it's much more involved than that (need to check favorites, etc). And actually, I realised that if a post within a thread has its subject changed such that it won't match the 'string' then that post won't be moved, resulting in a broken thread.
So, I'm after any suggestions on how to go about moving threads in bulk based on some criteria?
I'm using version 6.2.3.
Cheers.