Support Forums - Classified Ads Script Osclass
General osclass questions => General discussion => Topic started by: Ahmed Abdelhamed on October 19, 2021, 03:03:43 AM
-
i try to upload a csv file exported from db browser i filled with the content to upload it on oc_t_item table but i got this error in phpmyadmin please can u tell me how solve this problem thanks in advanced
#1452 - Cannot add or update a child row: a foreign key constraint fails (`osa`.`oc_t_item`, CONSTRAINT `oc_t_item_ibfk_1` FOREIGN KEY (`fk_i_user_id`) REFERENCES `oc_t_user` (`pk_i_id`))
-
@Ahmed
fk_i_user_id has foreign key to t_user table, so you provide NULL here or value must be present in t_user.pk_i_id.
You may also disable foreign key check before upload.
-
@ MB Themes
please sir can i know how to disable foreign key check to the t_user table
-
@Ahmed
Other options: in phpmyadmin
Enable foreign key field checking
Uncheck the box in phpmyadmin when you upload the file
-
@ mwindey
thanks sir