commit transaction after select query

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
phisch 2016-11-23 12:27:06 +01:00 committed by Lukas Reschke
parent b0c1460a1d
commit fc67606d39
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,6 @@ class DefaultShareProvider implements IShareProvider {
$this->dbConn->beginTransaction();
$qb->execute();
$id = $this->dbConn->lastInsertId('*PREFIX*share');
$this->dbConn->commit();
// Now fetch the inserted share and create a complete share object
$qb = $this->dbConn->getQueryBuilder();
@ -172,6 +171,7 @@ class DefaultShareProvider implements IShareProvider {
$cursor = $qb->execute();
$data = $cursor->fetch();
$this->dbConn->commit();
$cursor->closeCursor();
if ($data === false) {