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