On the form, when you select "Asia" from the Parent list, run the query select Name from country, area_country where country.country_id = area_country.country_id and area_country.area_id = 2;
will bring back "China" in this example
pass in the area_id that you select.
*************
Given that you have a limited number of combinations, you could simplify it by building a single table
Table: LOCATION Columns: Area, Country Contents: Europe, Ireland Europe, Great Britain Europe, France Asia, China North America, USA North America, Canada
Same concept though - when you pick "Europe" from the parent list, you run a query:
select country from location where area = 'Europe';
and it will bring back Ireland, Great Britain, France
no subject
Date: 2008-11-01 09:09 pm (UTC)Table: PARENT_AREA
Columns: Area_Id, Name
Contents:
1,Europe
2,Asia
3,North America
Table: COUNTRY
Columns: Country_Id, Name
Contents:
1,Ireland
2,Great Britain
3,China
4,Canada
5,US
Table: Area_Country
Columns: Area_id, Country_id
Contents:
1,1
1,2
2,3
3,4
3,5
On the form, when you select "Asia" from the Parent list, run the query
select Name from country, area_country
where country.country_id = area_country.country_id
and area_country.area_id = 2;
will bring back "China" in this example
pass in the area_id that you select.
*************
Given that you have a limited number of combinations, you could simplify it by building a single table
Table: LOCATION
Columns: Area, Country
Contents:
Europe, Ireland
Europe, Great Britain
Europe, France
Asia, China
North America, USA
North America, Canada
Same concept though - when you pick "Europe" from the parent list, you run a query:
select country from location where area = 'Europe';
and it will bring back Ireland, Great Britain, France