// update the thread if there are any conditions to update
if ($threadinfo['replycount'] == X]) { $threadupdate[] = 'open = 0'; }