mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-25 02:10:53 +00:00
Transactions not required here either, actually
This commit is contained in:
parent
4982e7c6c4
commit
c008e0b46d
1 changed files with 0 additions and 4 deletions
|
@ -130,14 +130,10 @@ class DBLayer {
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
$sth->bindValue( ":$key", $value );
|
$sth->bindValue( ":$key", $value );
|
||||||
}
|
}
|
||||||
$this->PDO->beginTransaction();
|
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
$lastId = $this->PDO->lastInsertId();
|
$lastId = $this->PDO->lastInsertId();
|
||||||
$this->PDO->commit();
|
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
// for rolling back the changes during transaction
|
|
||||||
$this->PDO->rollBack();
|
|
||||||
throw $e; // new Exception( "error in inseting" );
|
throw $e; // new Exception( "error in inseting" );
|
||||||
}
|
}
|
||||||
return $lastId;
|
return $lastId;
|
||||||
|
|
Loading…
Reference in a new issue