1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/docs/en/_old-docs/Database operations - Transactions.php
2007-10-17 21:16:49 +00:00

16 lines
257 B
PHP

<code type="php">
$sess = Doctrine_Manager::getInstance()->openConnection(new PDO("dsn","username","password"));
try {
$sess->beginTransaction();
// some database operations
$sess->commit();
} catch(Exception $e) {
$sess->rollback();
}
</code>