Crap! I did this a few years ago but don't have the code anymore ... But
here's the idea, you're gonna have to hunt down and find the stuff though.
I got a hold of a database of every US zip code geocoded. So every zip code
had a Lat and a Long.
There's a simple formula to measure the distance (as the crow flies) between
two co-ordinates on the earth. The original formula is complex because it
takes into account the curvature of the earth, but in it's simplified form,
it gives good results with a very acceptable (small) margin of error.
Let's use the example of car dealerships, you have a table of them, with a
zip code for each.
Since you have your search zip code, you can lookup its Lat and Long, and
perform a search of all "car dealerships" within x miles of your search zip
code.
Having the formula and the zip code geocode table makes this a piece of
cake. sorry I can't find them