Hi. Here's our approach to the same question to add to your cooking pot
of possibilities. It worked well for us but might be a lot of extra
effort compared to others' solutions. We subscribed to a zip service, at
www.tpsnet.com. I don't know if that's the best or cheapest one with
recent data or not, we didn't do a lot of shopping. It was interesting,
you pick up an ascii comma-delimited database from them ($150/yr, IIRC,
data updated monthly) that includes latitudes and longitudes for each zip
code, and they also give you some helpful documentation on how to do an
approximate but quite close calculation of distance using latitude and
There are lots of zip codes in the USA, something like 35,000. To save
the server for other things, I put the zip codes into a table in their own
database, and then kept a local copy of the same table that just had zip
codes for dealers in the database, populating it one by one when necessary
while adding records. That allowed me to do the calculations on less zip
records to find the dealers with zip codes nearby. It also made the full
list of zip code data easily available to other users on the system.
That was a lot of extra effort that may not have been needed, though.
The calculations went pretty fast on the zip code database with the full
I wonder too, if there are other ways than using zip code coordinates to
On Thu, 24 Aug 2000, Thomas Clark wrote:
> Has anyone out there worked with zip codes? We have a client that just
> wants a simple dealer locator where you punch in a zip code and it comes up
> with dealers located within 50 miles or so.
> Any suggestions?
> Please check "http://www.mysql.com/php/manual.php" before
> posting. To request this thread, e-mail mysql-thread48839@stripped
> To unsubscribe, send a message to:
> If you have a broken mail client that cannot send a message to the above
> address(Microsoft Outlook), you can use http://lists.mysql.com/php/unsubscribe.php