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