dimanche 1 novembre 2020

How to Join two tables using join?

I want to join two tables(country, city) and print the information about cities of each country. But it shows errors What is wrong?

...

$filtered_country = mysqli_real_escape_string($link, $_GET['Country']);
$query = "
    SELECT Name, District, Population
    FROM city 
    LEFT JOIN country
    ON city.CountryCode = country.Code
    ORDER BY Population DESC
    WHERE country.Name = '{$filtered_country}'
";



Aucun commentaire:

Enregistrer un commentaire