Welcome Guest, Not a member yet? Register   Sign In
How to use Trigger
#1

[eluser]Amit Patel[/eluser]
Hell All,

How can i user trigger and stored procedure using CI database class.

Please guide me...
#2

[eluser]obiron2[/eluser]
you cant.

The trigger is on the database and will be envoked when you insert/update/delete/read a record irrespective of how the transaction is initiated - thats why you use a trigger.

If you mean a stored procedure, that is different, but I still don't think you can call a stored proc through the database class and active records . You could however write do db->query("EXEC My_StoredProcedure(param1,param2)") but i'm not sure what you would get back as a results set because the SP does not have to generate a result, it could simply be doing a background database update (e.g. check for emails to be sent)

Obiron




Theme © iAndrew 2016 - Forum software by © MyBB