regarding handling of result obtained by triggers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ashu.khetan
Forum Newbie
Posts: 6
Joined: Tue Apr 17, 2007 1:16 am

regarding handling of result obtained by triggers

Post 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:((
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You don't get the results from a trigger normally.
ashu.khetan
Forum Newbie
Posts: 6
Joined: Tue Apr 17, 2007 1:16 am

Post by ashu.khetan »

and that is what i want to know my dear friend:)that is how to get result from triggers
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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.
ashu.khetan
Forum Newbie
Posts: 6
Joined: Tue Apr 17, 2007 1:16 am

Post 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:(
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply