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