![]() |
mysqli_sql_exception #1452 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: mysqli_sql_exception #1452 (/showthread.php?tid=82789) |
mysqli_sql_exception #1452 - danidan237 - 08-23-2022 hello i'm facing some problem when i am trying to insert new record in my responsable user table.Down below you can see the error message that i'm dealing with and some code source of my work Cannot add or update a child row: a foreign key constraint fails ('snoie'.'responsableuser', CONSTRAINT `responsableuser_ibfk_1` FOREIGN KEY (`org_id`) RERENCES `organisation` (`id_org`) ON DELEE CASCADE ON UPDATE CASCADE here is the link of a screenshot of my tables responsable user table organisation table PHP Code: public function add_coord_user() Code: $nom = $this->request->getVar('nom'); |