This error generally comes when we want to delete child table row. To solve this problem we have to disable the
foreign key checks.
SET FOREIGN_KEY_CHECKS=0;
Now you can fire your query.
DELETE FROM TABLE WHERE ID = 'Somthing';
You can enable foreign key again
SET FOREIGN_KEY_CHECKS=1;
0 Comment(s)