Buy Now
Sign in

Can db saves be embedded in a transaction? - Revisited

NickOg , January 18 2020, 01:42
NickOg 832
January 18 2020, 01:42 #390767
I did ask this a while ago and didn't find an answer,
If I add a db save action - to a table -T1- and add a second save action to a different table - T2 - under success for T1 but that second save to T2 fails does the first save to T1 roll back? That is Is there a rollback action or do I have to handle such scenarios in php?
rollback.jpg
Nick
GreyHead 64
January 18 2020, 09:55 #390775
 Answer
Hi Nick,
There's no roll-back - PHP in the Fail event of the second action is probably the simplest method.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
NickOg 832
January 18 2020, 18:59 #390781
Thanks Bob. Understood
Nick