title: On delete restrict mysql is not working
body: <p>I want to prevent deleting from parent table when he has children in other tables that.</p>
  
  <p>I make like this</p>
  
  <pre><code>ALTER TABLE constant_det_tb 
  ADD CONSTRAINT fk_idparent
  FOREIGN KEY (idparent)
  REFERENCES constant_tb(id) ON DELETE RESTRICT
  </code></pre>
  
  <p>When I delete from parent constant_tb table, it delete the rows even the table has reference to another tables and it has records reference to it.</p>