CodeIgniter Forums

Full Version: active record foreign key...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]psychoder[/eluser]
is there a way i can trap when the user delete the record which is
associated with another record in another table ( foreign key constraints )...


do i have to check it using another query??

El Forum

[eluser]Bhashkar Yadav[/eluser]
I think, you are deleting records from the controller's method.
so you can create a hook and associate as post_controller with the controller and method which deleting the records.
In this way you can track if records have been deleted successfully.

El Forum

[eluser]Bhashkar Yadav[/eluser]
for hooks, you can get help from here: http://ellislab.com/codeigniter/user-gui...hooks.html