1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/manual/codes/Database operations - Transactions.php

15 lines
250 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
$sess = Doctrine_Manager::getInstance()->openSession(new PDO("dsn","username","password"));
try {
$sess->beginTransaction();
// some database operations
$sess->commit();
} catch(Exception $e) {
$sess->rollback();
}
?>