modify call of lastInsertId() of connection

This commit is contained in:
aina-esokia
2018-07-26 12:24:40 +04:00
parent 7465b0d56b
commit 74ff97eba6
4 changed files with 12 additions and 8 deletions

View File

@@ -458,11 +458,12 @@ class Bridge_Element
':datas' => serialize($datas),
];
$stmt = $app->getApplicationBox()->get_connection()->prepare($sql);
$connection = $app->getApplicationBox()->get_connection();
$stmt = $connection->prepare($sql);
$stmt->execute($params);
$stmt->closeCursor();
$element_id = $app->getApplicationBox()->get_connection()->lastInsertId();
$element_id = $connection->lastInsertId();
return new self($app, $account, $element_id);
}