@@ 121-135 (lines=15) @@ | ||
118 | sqlrcon_autoCommitOff($this->_conn); |
|
119 | } |
|
120 | ||
121 | public function commitTransaction() |
|
122 | { |
|
123 | if ($this->_transaction) { |
|
124 | $this->_transaction = false; |
|
125 | ||
126 | $ret = sqlrcon_commit($this->_conn); |
|
127 | if ($ret === 0) { |
|
128 | throw new DataBaseException('Commit failed'); |
|
129 | } else if ($ret === -1) { |
|
130 | throw new DataBaseException('An error occurred. Commit failed'); |
|
131 | } |
|
132 | ||
133 | sqlrcon_autoCommitOn($this->_conn); |
|
134 | } |
|
135 | } |
|
136 | ||
137 | public function rollbackTransaction() |
|
138 | { |
|
@@ 137-151 (lines=15) @@ | ||
134 | } |
|
135 | } |
|
136 | ||
137 | public function rollbackTransaction() |
|
138 | { |
|
139 | if ($this->_transaction) { |
|
140 | $this->_transaction = false; |
|
141 | ||
142 | $ret = sqlrcon_rollback($this->_conn); |
|
143 | if ($ret === 0) { |
|
144 | throw new DatabaseException('Commit failed'); |
|
145 | } else if ($ret === -1) { |
|
146 | throw new DatabaseException('An error occurred. Commit failed'); |
|
147 | } |
|
148 | ||
149 | sqlrcon_autoCommitOn($this->_conn); |
|
150 | } |
|
151 | } |
|
152 | ||
153 | public function executeSql($sql, $array = null) |
|
154 | { |