$vbulletin->db->query_write(" DELETE FROM " . TABLE_PREFIX . "threadviews WHERE threadid = " . intval($threadinfo['threadid']));