Exemple #1
0
 private function executeQueryRollbackOnException($stmt, $dataArray = null)
 {
     try {
         $stmt->execute($dataArray);
     } catch (Exception $ex) {
         $this->pdo->rollBack();
     }
 }
Exemple #2
0
 /**
  * 事务回滚 
  */
 public function rollBackTrans()
 {
     if ($this->pdo->inTransaction()) {
         $this->pdo->rollBack();
     }
 }