title: Can not delete a row in the table (MySQL)
body: <p>Dear all, I have a problem in MySQL:
  I failed to execute <code>DELETE FROM users where user_id ='1';</code> in the MySQL CLI.
  So I tried in the phpMyAdmin:
  Use the GUI to delete a row, I got this:</p>
  
  <p>SQL query:</p>
  
  <pre><code>DELETE FROM `health_portal`.`users` WHERE `users`.`user_id` =1
  </code></pre>
  
  <p>MySQL said: Documentation</p>
  
  <pre><code>Cannot delete or update a parent row: a foreign key constraint fails (`health_portal`.`users`, CONSTRAINT `users_ibfk_2` FOREIGN KEY (`doctor_id`) REFERENCES `users` (`user_id`)) 
  </code></pre>
  
  <p>I looked up this error in the Mysql website and got:
  Error: 1451 SQLSTATE: 23000  (ER_ROW_IS_REFERENCED_2)</p>
  
  <p>Message: Cannot delete or update a parent row: a foreign key constraint fails (%s) </p>
  
  <p>I don't know what is wrong here, hope anyone can give me a heads-up. </p>
  
  <p>Many thx!</p>