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

@@ -947,9 +947,10 @@ class databox_field implements cache_cacheableInterface
throw new \Exception_InvalidArgument();
}
$stmt = $databox->get_connection()->prepare($sql);
$connection = $databox->get_connection();
$stmt = $connection->prepare($sql);
$stmt->execute([':name' => $name, ':sorter' => $sorter]);
$id = $databox->get_connection()->lastInsertId();
$id = $connection->lastInsertId();
$stmt->closeCursor();
$databox->delete_data_from_cache(databox::CACHE_META_STRUCT);