Forums

Can db saves be embedded in a transaction? - Revisited

NickOg 18 Jan, 2020
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?



Nick
GreyHead 18 Jan, 2020
Answer
Hi Nick,


There's no roll-back - PHP in the Fail event of the second action is probably the simplest method.

Bob
NickOg 18 Jan, 2020
Thanks Bob. Understood

Nick
This topic is locked and no more replies can be posted.