Skip to content

Commit

Permalink
The adapter must have a connection handler before making a transaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Sánchez authored and mikeho committed Aug 28, 2010
1 parent 1b28d16 commit 32bd878
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions includes/qcodo/_core/database/QPdoDatabase.class.php
Expand Up @@ -54,14 +54,26 @@ public function Close() {
}

public function TransactionBegin() {
// Connect if Applicable
if (!$this->blnConnectedFlag) {
$this->Connect();
}
$this->objPdo->beginTransaction();
}

public function TransactionCommit() {
// Connect if Applicable
if (!$this->blnConnectedFlag) {
$this->Connect();
}
$this->objPdo->commit();
}

public function TransactionRollBack() {
// Connect if Applicable
if (!$this->blnConnectedFlag) {
$this->Connect();
}
$this->objPdo->rollback();
}

Expand Down

0 comments on commit 32bd878

Please sign in to comment.