This does not work, I am getting following error. I know why, because I cannot select and update on same tables. Can someone help/guide me in the right direction?
update
episode
set
update_wp = 1
where
episode_id in(
select
e.episode_id
from
collection c
inner join
season s on s.collection_id = c.collection_id
inner join
episode e on e.season_id = s.season_id
where
c.title ='mom'
);
MySQL Response:
ERROR 1093 (HY000): You can't specify target table 'episode' for update in FROM clause