Welcome Guest, Not a member yet? Register   Sign In
Foreign Key constraint check
#11

[eluser]ch5i[/eluser]
Thanks noctrum,

the problem is not really the database, it works as it should - prevents deletion of a child row and throws error 1451 (foreign key constraint failure).

Quote:Everything is working fine, just want to know how to detect and display the error with foreign key on delete, rather than display the CI error

The problem is when trying to delete a child row I'd like to tell the user that the child row cannot be deleted because it still has a parent.

You can prevent showing the error messages by disabling all db debug info in db config, but i'd prefer to do it in another way.


Messages In This Thread
Foreign Key constraint check - by El Forum - 05-23-2009, 09:14 PM
Foreign Key constraint check - by El Forum - 05-24-2009, 12:14 AM
Foreign Key constraint check - by El Forum - 05-24-2009, 11:14 AM
Foreign Key constraint check - by El Forum - 05-24-2009, 11:19 AM
Foreign Key constraint check - by El Forum - 05-24-2009, 11:24 AM
Foreign Key constraint check - by El Forum - 05-24-2009, 11:31 AM
Foreign Key constraint check - by El Forum - 05-24-2009, 11:36 AM
Foreign Key constraint check - by El Forum - 05-25-2009, 09:41 AM
Foreign Key constraint check - by El Forum - 03-10-2010, 12:11 PM
Foreign Key constraint check - by El Forum - 03-10-2010, 12:14 PM
Foreign Key constraint check - by El Forum - 03-10-2010, 12:28 PM
Foreign Key constraint check - by El Forum - 03-10-2010, 01:43 PM
Foreign Key constraint check - by El Forum - 04-05-2011, 01:58 PM
Foreign Key constraint check - by El Forum - 04-05-2011, 11:34 PM
Foreign Key constraint check - by El Forum - 04-06-2011, 01:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB