Page 1 of 1
regarding handling of result obtained by triggers
Posted: Sun Apr 22, 2007 1:25 am
by ashu.khetan
i am facing a big problem.it is related to handling of triggers by php.suppose i have stored a trigger in mysql server.let it be that its an "after" trigger.now when we try to update a table then a trigger is called. i want to know how can we capture the result produced by that trigger using php.since i am only passing the update query, i really don't know what is happening behind the scene(i.e. when is the error executed and what is the output of the trigger.though the output of a stored procedure can be easily captured(because in the case of procedure we directly call the procedure in our query), but what we will be do in case of trigger?..pleaseee help me..i am really confused:((
Posted: Sun Apr 22, 2007 7:57 am
by feyd
You don't get the results from a trigger normally.
Posted: Sun Apr 22, 2007 12:54 pm
by ashu.khetan
and that is what i want to know my dear friend:)that is how to get result from triggers
Posted: Sun Apr 22, 2007 6:55 pm
by Weirdan
It's not clear why you want to know that. Provide real-world scenario where getting some kind of results from trigger would be useful. I bet there are better ways to achieve what you're trying to achieve.
Posted: Mon Apr 23, 2007 9:37 am
by ashu.khetan
the reason is that capturing the result of the trigger is part of my mtech project work and i am not getting even a slightest idea about how to do it:(
Posted: Mon Apr 23, 2007 9:46 am
by feyd
Triggers are meant to modify the incoming data or update/alter other tables to reflect the incoming data. They don't return anything. You'll have to select their results afterward.