$DB_site->query("UPDATE thread SET firstpostid='".intval($threadupdate['postid'])."' WHERE threadid='".intval($prepost['threadid'])."' AND entry_id='".intval($e)."'");