mirror of
https://github.com/YunoHost-Apps/emailpoubelle_ynh.git
synced 2024-09-03 18:26:29 +02:00
Gestion du LastID pour sqlite & le reste du monde
This commit is contained in:
parent
e7b92f49a3
commit
75542a35bc
1 changed files with 7 additions and 1 deletions
|
@ -79,7 +79,13 @@ function AjouterAlias($status, $alias,$email, $life, $comment) {
|
|||
die();
|
||||
}
|
||||
UpdateVirtualDB();
|
||||
if (preg_match('/^sqlite/', DB)) {
|
||||
return $dbco->lastInsertId();
|
||||
} else {
|
||||
$stmt = $dbco->query("SELECT LAST_INSERT_ID()");
|
||||
return $stmt->fetchColumn();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// delete email
|
||||
|
|
Loading…
Reference in a new issue