1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/manual/codes/Transactions - Introduction.php
2006-07-23 21:08:06 +00:00

14 lines
264 B
PHP

<?php
$session->beginTransaction();
$user = new User();
$user->name = 'New user';
$user->save();
$user = $session->getTable('User')->find(5);
$user->name = 'Modified user';
$user->save();
$session->commit(); // all the queries are executed here
?>