ashu.khetan Posted April 22, 2007 Share Posted April 22, 2007 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:(( Link to comment https://forums.phpfreaks.com/topic/48100-facing-a-big-problem-related-to-handling-of-triggers-by-php/ Share on other sites More sharing options...
ashu.khetan Posted April 22, 2007 Author Share Posted April 22, 2007 plz someone help yaar:( Link to comment https://forums.phpfreaks.com/topic/48100-facing-a-big-problem-related-to-handling-of-triggers-by-php/#findComment-235388 Share on other sites More sharing options...
Glyde Posted April 22, 2007 Share Posted April 22, 2007 Seeing as triggers are actually run in the background before or after a query, I don't think you can capture the result of a trigger. I guess, if you are using an insert or update statement however, you can run a select statement, check the data, and see if the trigger did what it should have done. Other than that, that's a good point, and I'm not sure. I haven't really worked with triggers, though I am familiar with them and know how they work...it's still hard to help. Link to comment https://forums.phpfreaks.com/topic/48100-facing-a-big-problem-related-to-handling-of-triggers-by-php/#findComment-235393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.