Выпадающие меню для штата -> Округ -> Город из базы данных MySQL [закрыто]MySql

Форум по Mysql
Anonymous
Выпадающие меню для штата -> Округ -> Город из базы данных MySQL [закрыто]

Сообщение Anonymous »

Я пытаюсь создать интерактивный раскрывающийся список для штата/округа/города/SIC (на выбор из 5 SICS) с использованием MySQL и PHP...
Я не могу найти любые примеры, которые работают с этими данными.
PULL DOWN 1

Код: Выделить всё

select distinct state from data20251;
ВНИЗ 2

Код: Выделить всё

select distinct county from data20251 where state = 'xx';
ВНИЗ 3

Код: Выделить всё

select distinct city from data20251 where state = 'xx' and county = 'xxxxxxxxxxx';
ВНИЗ 4

Код: Выделить всё

select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123451';
select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123452';
select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123453';
select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123454';
select name,street from data20251  where state = 'xx' and county = 'xxxxxxxxxxx' and city = 'xxxxxxxxxxx' and SIC = '123455';
Если кто-нибудь сможет мне помочь, я буду очень признателен.
Спасибо!

Подробнее здесь: https://stackoverflow.com/questions/793 ... l-database

Вернуться в «MySql»