I have a query (probably not the most efficient way of doing it but I am learning) where I am joining three tables together to display the results of city, county, and state. It works great but I would like for it to not display the duplicates. What is the best way to go about that?
Lake Mills Winnebago Iowa
Lake Mills Jefferson Wisconsin
Madison Dane Wisconsin
Madison Dane Wisconsin
Madison Dane Wisconsin
Middleton Dane Wisconsin
Oakland Alameda California
Orlando Orange County Florida
So instead of showing every madison it would only display once assuming that it the same county and state
$sql = "SELECT city.city, county.county, state.state FROM city INNER JOIN county ON city.city_id=county.county_id INNER JOIN state ON city.city_id=state.state_id ORDER BY city.city";