Triggers - ok or what?
Posted: Sat Jan 19, 2013 12:17 pm
Am I ok using triggers in mysql db?
I assume that nuBuilder doesn't use them for it's work, but is there a reason I need to avoid or anything to watch out for?
For example I'm keeping a 1:1 table with the current Postal Address for a record - this being calculated with various parameters.
At the moment I do this with AfterSave php which is fine, but occurs to me that I might do it with a trigger more easily.
Have also starting looking at audit trails for record changes and a trigger may make this very simple.
Any gotchas ?
Thanks
Martin
I assume that nuBuilder doesn't use them for it's work, but is there a reason I need to avoid or anything to watch out for?
For example I'm keeping a 1:1 table with the current Postal Address for a record - this being calculated with various parameters.
At the moment I do this with AfterSave php which is fine, but occurs to me that I might do it with a trigger more easily.
Have also starting looking at audit trails for record changes and a trigger may make this very simple.
Any gotchas ?
Thanks
Martin