Jump to content

facing a big problem related to handling of triggers by php


ashu.khetan

Recommended Posts

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:((

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.