Hello. i tried to delete some countries but got error, then i tried to delete that country and getting this error:

MySQL atsakymas: Dokumentacija

#1451 - Cannot delete or update a parent row: a foreign key constraint fails (`reslui_skn`.`oc_t_region`, CONSTRAINT `oc_t_region_ibfk_1` FOREIGN KEY (`fk_c_country_code`) REFERENCES `oc_t_country` (`pk_c_code`))

maybe someone knows how to solve this  ?

when i import countries so there no problem but when i tried manualy add and then delete its cant be deleted.

*

MB Themes

@Ruslanas
You did it in database?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

first I tried to delete in osclass admin panel, when i got error i tired delete ir in phpmyadmin and then got error #1451 - Cannot delete or update a parent row: a foreign key constraint fails

*

MB Themes

It is bit weird, but you can avoid that error by first removing data related to this country (t_city, t_region)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

no all empty. no cities, no regions. when i create in osclass admin i only create country then i tried to delete with no success cause i saw import posibility. i can only now rename that country. i cant add cities or regions to that country also
« Last Edit: April 28, 2022, 06:50:13 PM by Ruslanas Pskvj »

*

MB Themes

Then your db is corrupted.
What you arr saying is impossible.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

i checked. all tables normal, no errors.  i searched in google so the problem is in foreign key, but i dont understand how i can disable foreign key in phpmyadmin, only using ssh but i dont have ssh

here is screenshot on lithuanian language when i try to delete ir i getting error There was an error deleting the location.

*

MB Themes

Try to use mysql 8.0 if you are not using it
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots