LPH
Well-known member
The following works:
But I wanted to simply use the datawriter and cannot seem to get it to work.
I've also tried setExistingData. Am I missing an easy way to change the node_id in xf_thread?
PHP:
$node_id = XenWord::getForumIdForPost( $post->ID );
$thread_id = $thread['thread_id'];
$update = "UPDATE `xf_thread` SET `node_id` = ? WHERE `thread_id` = {$thread_id}";
XenForo_Application::getDb()->fetchOne($update, $node_id);
But I wanted to simply use the datawriter and cannot seem to get it to work.
PHP:
$node_id= XenWord::getForumIdForPost( $post->ID );
$writer->set( 'node_id', $node_id );
I've also tried setExistingData. Am I missing an easy way to change the node_id in xf_thread?