2006-07-23 21:08:06 +00:00
|
|
|
<?php
|
2006-08-21 22:51:27 +00:00
|
|
|
$conn->beginTransaction();
|
2006-07-23 21:08:06 +00:00
|
|
|
|
|
|
|
$user = new User();
|
|
|
|
$user->name = 'New user';
|
|
|
|
$user->save();
|
|
|
|
|
2006-08-21 22:51:27 +00:00
|
|
|
$user = $conn->getTable('User')->find(5);
|
2006-07-23 21:08:06 +00:00
|
|
|
$user->name = 'Modified user';
|
|
|
|
$user->save();
|
|
|
|
|
2006-08-21 22:51:27 +00:00
|
|
|
$conn->commit(); // all the queries are executed here
|
2006-07-23 21:08:06 +00:00
|
|
|
?>
|