MySQL Help Can't delete row (errno: 150) foreign key constraint?

The foreign key is on the plan table so you would want to drop it form there : ALTER TABLE `plans` DROP FOREIGN KEY `FK_plans` But be aware that this key (and the fact that it's stopping you) might be a desirable thing. The reason it is there is to prevent options from getting into the plan_options table which aren't associated with a plan. As such, you might want to delete from both tables when deleting: DELETE FROM plans, plan_options WHERE plan_id =?

The foreign key is on the plan table, so you would want to drop it form there: ALTER TABLE `plans` DROP FOREIGN KEY `FK_plans` But be aware that this key (and the fact that it's stopping you) might be a desirable thing. The reason it is there is to prevent options from getting into the plan_options table which aren't associated with a plan. As such, you might want to delete from both tables when deleting: DELETE FROM plans, plan_options WHERE plan_id =?

Uppon trying to delete a record in one of my tables I got the following. So I did some research, looks like I have some messed up foreign keys. I tried to remove the key but then I got this.

And that's as far as I can get. I'm not that great with MySQL dbs yet and definitely get hung up on when it comes to foreign keys. Can someone help?

It looks like the two tables involved are plans and plan_options.

The foreign key is on the plan table so you would want to drop it form there.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions