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

15 lines
250 B
PHP

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