title: How to update on cascade in MySQL?
body: <p>Let's look at this example database:
  <img src="https://i.stack.imgur.com/TFDkv.png" alt="Example database"></p>
  
  <p>As we can see, person depends on the city (person.city_id is a foreign key). I don't delete rows, I just set them inactive (active=0). After setting city inactive, how can I automatically set all persons who are dependent on this city inactive? Is there a better way than writing triggers?</p>
  
  <p>EDIT: I am interested only in setting person's rows inactive, not setting them active.</p>