Query Builder Class - Problem with delete vs foreign key constraint - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Query Builder Class - Problem with delete vs foreign key constraint (/showthread.php?tid=76535) |
Query Builder Class - Problem with delete vs foreign key constraint - George Rangel - 05-21-2020 Hi everyone! I have this code: PHP Code: /** The code is working when delete function returns !== false ... and seeing the docs https://codeigniter.com/user_guide/database/query_builder.html?highlight=delete#delete , in case of failure, the delete function would return false. But I'm getting an error, because I have a MySQL foreign key constraint. I can fix it checking this foreign key constraint first, but the delete function would not returning false? |