$db->query_write("UPDATE " . TABLE_PREFIX . "thread SET open = 0 WHERE threadid = '$threadid' AND votetotal/votenum <= '5'");
$db->query_write("UPDATE " . TABLE_PREFIX . "thread SET open = 0 WHERE threadid = '$threadid' AND votetotal <= '5'");