Database operations - Nested transactions.php 297 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <code type="php"> try { $conn->beginTransaction(); $user->save(); $conn->beginTransaction(); $group->save(); $email->save(); $conn->commit(); $conn->commit(); } catch(Exception $e) { $conn->rollback(); } </code>