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) {
die();
}
UpdateVirtualDB();
// return $dbco->lastInsertId();
$stmt = $dbco->query("SELECT LAST_INSERT_ID()");
return $stmt->fetchColumn();
if (preg_match('/^sqlite/', DB)) {
return $dbco->lastInsertId();
} 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