My little site should be pooling list of items from a table using the active user's location as a filter. Think Craigslits, where you search for "dvd' but the results are not from all the DB, they are filtered by a location you select. My question has 2 levels:
- should I go a-la-craigslit, and ask users to use a city level location? My problem with this is that you need to generate what seems to me a hard coded, hand made list of locations.
- should I go a-la-zipCode. The idea of just asking the user to type his zipcode, and then pool all items that are in the same or in a certain distance from his zip code.
I seem to prefer the zip code way as it seems more elegant solution, but how on earth do one goes about creating a DB of all zip codes and implement the function that given zip code 12345, gets all zipcodes in 1 mile distance?
this should be fairly common "task" as many sites have a need similar to mine, so I am hoping not to re-invent the wheel here.
thanks