This commit is contained in:
2024-01-15 08:58:24 +01:00
parent b6ec972c19
commit 9c82aec3c5
3 changed files with 100 additions and 65 deletions

View File

@@ -95,6 +95,27 @@ class BenutzerModel extends Database
}
public function nextId()
{
$pdo = $this->linkDB();
$sql = "SELECT `auto_increment` FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'Benutzerkonto'; ";
try {
$stmt = $pdo->prepare($sql);
$stmt->execute();
} catch (\PDOException $e) {
return false;
}
$result = $stmt->fetchALL(\PDO::FETCH_ASSOC);
return $result;
}
}
?>