Friday, 19 October 2012

How to use commit and rollback transactions using symfony?

Hi All,

$con = Doctrine_Manager::connection();
try {
    $con->beginTransaction();
    // execute all queries...
    $con->commit();
   
}catch (Exception $e) {
   
        $con->rollback();       
        // error message will come here...
   

}

Cheers!

No comments:

Post a Comment