$threads = $DB_site->query("SELECT threadid FROM " . TABLE_PREFIX . "thread WHERE forumid=$forum[forumid] AND lastpost <= " . (TIMENOW - ($forum['pruneafter'] * 86400)));
$threads = $DB_site->query("SELECT threadid FROM " . TABLE_PREFIX . "thread WHERE forumid=$forum[forumid] AND sticky != 1 AND lastpost <= " . (TIMENOW - ($forum['pruneafter'] * 86400)));