I am trying to populate column s_phone_mobile
from oc_t_user
table to oc_t_item
table in mysql database. I use the following query:
INSERT INTO `oc_t_item` (s_phone_mobile)
SELECT s_phone_mobile
FROM oc_t_user;
But I get the following error:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`poljo_test`.`oc_t_item`, CONSTRAINT `oc_t_item_ibfk_2` FOREIGN KEY (`fk_i_category_id`) REFERENCES `oc_t_category` (`pk_i_id`))
I realize this may be duplicate question, but every "trick" I tried did not work for me.