Welcome Guest, Not a member yet? Register   Sign In
using transactions
#2

You probably need to run the transactions manually in this context. In other words, you start with trans_begin() instead of trans_start(), then use trans_rollback() and trans_commit() to control whether the transaction is rolled back or committed. You also don't use trans_complete() for manual transactions.

When running the transactions manually, remember to check trans_status() before calling trans_commit(). Essentially, this is what trans_complete() normally does (chooses whether to call trans_rollback() or trans_commit() based on the result of trans_status()), but controlling the transactions manually allows you to rollback or commit the transaction based on your own logic.
Reply


Messages In This Thread
using transactions - by sneakyimp - 07-13-2016, 02:20 PM
RE: using transactions - by mwhitney - 07-15-2016, 11:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB