I have two tables that I am trying to query with no luck.
Tableone contains the columns: region and City
Tabletwo contains the columns: last_name and City
I would like to create a query based on region that will display corresponding last names. For example, I would query table one for "region A", and then query table two for last names that have cities belonging to "region A". Hope that makes sense.
The query I tried was:
$query = "SELECT * FROM Tableone, Tabletwo WHERE (region = '$region') and (Tableone.City = Tabletwo.City)";
Unfortunately, I get the error:
Error in query: SELECT * FROM Tableone, Tabletwo WHERE (region = '') and (Tableone.City = Tabletwo.City). Column: 'region' in where clause is ambiguous
Help!!