Web design with large selections ideas needed

L

Lit

Hi Mark,

Check this out for yourself:

Texas has 254 Counties and 1515 Cities, But
http://www.texasalmanac.com/facts said, 1210 cities and the difference
accounts to the acceptable city names.

My requirements might even go down to the zipcode level, I don't make the
requirements.
Granularity is necessary, ridiculous or not. I don't make up the rules.

thanks again for your input.

Lit



Lit said:
Mark,

FYI:
Texas has 254 Counties and 1515 Cities, But
http://www.texasalmanac.com/facts said, 1210 cities and the difference
accounts to the acceptable city names.

So my thinking is assume 2000-3000 max... then what is the best way of
dealing with it.

Thank You,

Lit
 
B

Brandon Gano

If you are needing an arbitrary level of granularity, I think a recursive
database/interface is going to be the best solution.

CREATE TABLE Regions (
ID INT,
ParentRegionID,
Name NVARCHAR(150),
)

Regions could be as broad or as granular as you need them. In an extreme
case, you could have a hierarchy such as:

Earth
North America
United States
Washington
King County
Seattle
Capital Hill
2000 Block
2014 W 16th St
Suite G

The way the interface could work as a series of drop-down lists to filter
results and a two multi-select list boxes (one to show region options and
one to hold selected regions).

The first drop-down list would use "SELECT * Regions WHERE ParentRegionID IS
NULL". Selecting an item would utilize AJAX to create and populate another
drop-down list with sub-regions. Each time a region is selected, the list
box would be filtered accordingly.

Of course, you would need to require a certain level of filtering before
displaying options in the list box. For example, you wouldn't want to try to
show all cities in the US.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top