1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/docs/en/_old-docs/Database operations - Nested transactions.php

19 lines
297 B
PHP
Raw Normal View History

<code type="php">
try {
$conn->beginTransaction();
$user->save();
$conn->beginTransaction();
$group->save();
$email->save();
$conn->commit();
$conn->commit();
} catch(Exception $e) {
$conn->rollback();
}
</code>