about os class database
« 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`))


« Last Edit: October 19, 2021, 03:09:37 AM by Ahmed Abdelhamed »

*

MB Themes

Re: about os class database
« Reply #1 on: October 19, 2021, 09:32:30 AM »
@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.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: about os class database
« Reply #2 on: October 19, 2021, 12:38:57 PM »
@ MB Themes

please sir can i know how to disable foreign key check to the  t_user table

*

mwindey

  • *****
  • 484 posts
Re: about os class database
« Reply #3 on: October 19, 2021, 02:19:16 PM »
@Ahmed

Other options: in phpmyadmin
  Enable foreign key field checking
Uncheck the box in phpmyadmin when you upload the file

Re: about os class database
« Reply #4 on: October 19, 2021, 03:27:11 PM »
@ mwindey

thanks sir