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