delete from votes where votes.voting_id IN (select votes.voting_id from node INNER JOIN votes ON node.nid=votes.content_id AND node.uid = votes.uid) ERROR 1093 (HY000): You can't specify target table 'votes' for update in FROM clause