1
0
mirror of synced 2024-12-15 15:46:02 +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();
}
?>