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

16 lines
271 B
PHP
Raw Normal View History

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