1: 2:
DELETE FROM bbX_votes WHERE id=(SELECT voted FROM bbX_threads WHERE threadid=Y); UPDATE bbX_threads SET voted=0 WHERE threadid=Y;