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,19 +97,25 @@ class Database
public function startTransaction()
{
$this->pdo->beginTransaction();
if (! $this->pdo->inTransaction()) {
$this->pdo->beginTransaction();
}
}
public function closeTransaction()
{
$this->pdo->commit();
if ($this->pdo->inTransaction()) {
$this->pdo->commit();
}
}
public function cancelTransaction()
{
$this->pdo->rollback();
if ($this->pdo->inTransaction()) {
$this->pdo->rollback();
}
}