1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/manual/codes/Database operations - Nested transactions.php

18 lines
296 B
PHP

<?php
try {
$conn->beginTransaction();
$user->save();
$conn->beginTransaction();
$group->save();
$email->save();
$conn->commit();
$conn->commit();
} catch(Exception $e) {
$conn->rollback();
}
?>