Skip to content

Commit ac33e69

Browse files
committed
Changed directory structure to psr-4
1 parent 96286af commit ac33e69

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Databases/MySQL.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,23 @@ public function delete() {
173173
* @return $this
174174
*/
175175
public function transactionStart() {
176-
$this->exec('BEGIN;');
176+
$this->pdo->beginTransaction();
177+
return $this;
177178
}
178179

179180
/**
180181
* @return $this
181182
*/
182183
public function transactionCommit() {
183-
$this->exec('COMMIT;');
184+
$this->pdo->commit();
185+
return $this;
184186
}
185187

186188
/**
187189
* @return $this
188190
*/
189191
public function transactionRollback() {
190-
$this->exec('ROLLBACK;');
192+
$this->pdo->rollBack();
193+
return $this;
191194
}
192195
}

0 commit comments

Comments
 (0)