Closed billmn closed 12 years ago
I would assume that people that want to use transactions know what they are and how they work?
Do you have anything in mind? Can you suggest and example (probably one that contains both start, commit and rollback)?
Absolutely ... who uses transactions must know what they are and how they work.
I thought that a more complete example could better explain how to use the methods of the transactions together ... I was thinking something like:
try { DB::start_transaction(); // some query ... DB::commit_transaction(); // return query result } catch (Exception $e) { // rollback pending transactional queries DB::rollback_transaction(); throw $e; }
What do you think? Have you a better example?
In DB Class, transactions methods doesn't explains well how to use it
http://docs.fuelphp.com/classes/database/db.html#/method_start_transaction
I think it might be enough some explained examples