Commit d9f444c7 authored by David's avatar David
Browse files

#12 Gestion du LastID pour sqlite & le reste du monde

parent d9f086ee
...@@ -79,9 +79,12 @@ function AjouterAlias($status, $alias,$email, $life, $comment) { ...@@ -79,9 +79,12 @@ function AjouterAlias($status, $alias,$email, $life, $comment) {
die(); die();
} }
UpdateVirtualDB(); UpdateVirtualDB();
// return $dbco->lastInsertId(); if (preg_match('/^sqlite/', DB)) {
$stmt = $dbco->query("SELECT LAST_INSERT_ID()"); return $dbco->lastInsertId();
return $stmt->fetchColumn(); } else {
$stmt = $dbco->query("SELECT LAST_INSERT_ID()");
return $stmt->fetchColumn();
}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment