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

15 lines
253 B
PHP

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