I think I'm looking for the same thing; the only difference is adding 1 parameter to see if the thread should be moved.
I'd like to move all threads in one forum with at least 1 reply (2 posts within thread) to be auto-moved to another forum.
Do I just need to add an "AND replycount >=1" clause?
UPDATE:
Working like a charm. If anyone needs the code, the bottom snippet moves all threads with replies from forum id #17 over to forum id #2. I have it running as a cron job once an hour.
Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($DB_site))
{
exit;
}
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET forumid = 2 WHERE forumid = 17 AND replycount >= 1");
require_once('./includes/functions_databuild.php');
build_forum_counters(2);
build_forum_counters(17);
log_cron_action('Threads with replies moved from Forum 17 to Forum 2', $nextitem);
?>