From cd1fbe59f76cf08f9678ed07e1f00ebe199aa3f9 Mon Sep 17 00:00:00 2001 From: zero Date: Thu, 12 Apr 2007 04:51:47 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@1111 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DBMysqlInndoDB.class.php | 8 ++++++++ classes/db/DBSqlite3_pdo.class.php | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/classes/db/DBMysqlInndoDB.class.php b/classes/db/DBMysqlInndoDB.class.php index 67a535c7b..9583f78a1 100644 --- a/classes/db/DBMysqlInndoDB.class.php +++ b/classes/db/DBMysqlInndoDB.class.php @@ -113,18 +113,26 @@ * @brief 트랜잭션 시작 **/ function begin() { + if(!$this->isConnected() || $this->transaction_started) return; + $this->_query("begin"); } /** * @brief 롤백 **/ function rollback() { + if(!$this->isConnected() || !$this->transaction_started) return; + $this->_query("rollback"); + $this->transaction_started = false; } /** * @brief 커밋 **/ function commit() { + if(!$this->isConnected() || !$this->transaction_started) return; + $this->_query("commit"); + $this->transaction_started = false; } /** diff --git a/classes/db/DBSqlite3_pdo.class.php b/classes/db/DBSqlite3_pdo.class.php index e758aecc7..733d912f6 100644 --- a/classes/db/DBSqlite3_pdo.class.php +++ b/classes/db/DBSqlite3_pdo.class.php @@ -83,7 +83,7 @@ * @brief 트랜잭션 시작 **/ function begin() { - if(!$this->is_connected || $this->transaction_started) return; + if(!$this->isConnected() || $this->transaction_started) return; if($this->handler->beginTransaction()) $this->transaction_started = true; } @@ -91,7 +91,7 @@ * @brief 롤백 **/ function rollback() { - if(!$this->is_connected || !$this->transaction_started) return; + if(!$this->isConnected() || !$this->transaction_started) return; $this->handler->rollBack(); $this->transaction_started = false; } @@ -100,7 +100,7 @@ * @brief 커밋 **/ function commit() { - if(!$this->is_connected || !$this->transaction_started) return; + if(!$this->isConnected() || !$this->transaction_started) return; $this->handler->commit(); $this->transaction_started = false; }