0

hi ppl,

i am having issue updating the table with details from edited form, and it turns out to be foreign key constraint issue.

the error i am getting is,
================================
Cannot add or update a child row: a foreign key constraint fails (`****`.`purchase_order_detail`, CONSTRAINT `purchase_order_detail_component_item_id_component_item_id` FOREIGN KEY (`component_item_id`) REFERENCES `component_item` (`id`))
=================================
table:purchase_order_detail
foreign key: component_item_id
this is the key which links the table purchase_order_detail and component_item

in one of the threads i came across similar issue, where a member said, "While specifying the foreign key constraint you have specified "ON UPDATE NO ACTION" while this seems to mean that no action would be taken on update, it specifically means that you will not be allowed to update too, either remove the clause or if it is binding for you to have it, modify it suitably."

can anyone pls help me with this issue?? is it possible to modify so that "rows are updated on update", if so how do i do it...
pls help me this or post links to any tutorial where i can learn to do this..

thanks..

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by puvi
0

frens, more details on this issue, i checked in the "relation view" in phpmyadmin n this field component_item_id is not set on "ON UPDATE NO ACTION". i am using symfony framework, could this issue have raised because of symfony??

any suggestion in this direction most appreciated.

thanks a lott..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.