diff --git a/src/Pdo/Cache.php b/src/Pdo/Cache.php index 9b52a1d..57d19c3 100644 --- a/src/Pdo/Cache.php +++ b/src/Pdo/Cache.php @@ -87,7 +87,9 @@ public function exec($statement): int */ public function beginTransaction(): bool { - return $this->setAutoCommit(false); + $this->setAutoCommit(false); + + return $this->exec('START TRANSACTION'); } /** @@ -97,6 +99,7 @@ public function beginTransaction(): bool */ public function commit(): bool { + $this->exec('COMMIT'); $this->setAutoCommit(true); return (!\odbc_error($this->dbh)) @@ -111,6 +114,7 @@ public function commit(): bool */ public function rollBack(): bool { + $this->exec('ROLLBACK'); $status = @\odbc_rollback($this->dbh); if (!$status) {