I'm having a problem with a MYSQL Join accross three tables. I'm new to MYSQL Join functions, and can't quite figure out how to write the code. My current code is horribly innefficient and does not implement explicit joins, which I believe is much of the problem. Here it is(in php):
mysql_query("Select Airports.*, Regions.name AS RegionName, Countries.name AS CountryName, Regions.local_code AS StateCode FROM Airports, Regions, Countries WHERE Airports.ident LIKE '%".$fix."%' AND Regions.iso_region=Airports.iso_region AND Countries.code=Airports.iso_country")
I think this code shows pretty clearly which information I need from the database. Any suggestions on how to write the explicit join would be much appreciated!