mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
modify call of lastInsertId() of connection
This commit is contained in:
@@ -362,11 +362,12 @@ class Bridge_Account
|
||||
, ':name' => $name
|
||||
];
|
||||
|
||||
$stmt = $app->getApplicationBox()->get_connection()->prepare($sql);
|
||||
$connection = $app->getApplicationBox()->get_connection();
|
||||
$stmt = $connection->prepare($sql);
|
||||
$stmt->execute($params);
|
||||
$stmt->closeCursor();
|
||||
|
||||
$account_id = $app->getApplicationBox()->get_connection()->lastInsertId();
|
||||
$account_id = $connection->lastInsertId();
|
||||
|
||||
return new self($app, $api, $account_id);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user