query("SELECT region_name FROM regions ORDER BY region_name"); $regions = $stmt_regions->fetchAll(PDO::FETCH_COLUMN); $sql = " SELECT country_name, area, AVG(gdp) as avg_gdp, AVG(population) as avg_population, continent FROM nation WHERE region = :region GROUP BY country_name, area, continent ORDER BY country_name "; $stmt = $pdo->prepare($sql); $stmt->execute(['region' => $selected_region]); $countries = $stmt->fetchAll(PDO::FETCH_ASSOC); ?>
Bitte wählen Sie die Region aus, deren Länder angezeigt werden sollen.
| Land | Fläche | AVG BIP | AVG Bevälkerung | Kontinent |
|---|---|---|---|---|
| = htmlspecialchars($country['country_name']) ?> | = number_format($country['area'], 2) ?> | = number_format($country['avg_gdp'], 4) ?> | = number_format($country['avg_population'], 4) ?> | = htmlspecialchars($country['continent']) ?> |
Keine Daten für die ausgewählte Region gefunden.