2007-04-13 00:52:30 +04:00
|
|
|
|
2007-04-14 01:49:11 +04:00
|
|
|
<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>
|