Update picoDb

This commit is contained in:
Frédéric Guillot 2014-02-09 12:34:38 -05:00
parent 5cb7d40838
commit 49140ef84a

View File

@ -97,20 +97,26 @@ class Database
public function startTransaction() public function startTransaction()
{ {
if (! $this->pdo->inTransaction()) {
$this->pdo->beginTransaction(); $this->pdo->beginTransaction();
} }
}
public function closeTransaction() public function closeTransaction()
{ {
if ($this->pdo->inTransaction()) {
$this->pdo->commit(); $this->pdo->commit();
} }
}
public function cancelTransaction() public function cancelTransaction()
{ {
if ($this->pdo->inTransaction()) {
$this->pdo->rollback(); $this->pdo->rollback();
} }
}
public function table($table_name) public function table($table_name)