1
0
mirror of synced 2025-01-30 20:11:49 +03:00
doctrine2/manual/docs/Database operations - Nested transactions.php

19 lines
314 B
PHP

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