Update picoDb
This commit is contained in:
parent
5cb7d40838
commit
49140ef84a
12
vendor/PicoDb/Database.php
vendored
12
vendor/PicoDb/Database.php
vendored
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user