Function for returning "nearest cities" ?
Posted: Wed Oct 26, 2011 11:27 pm
I already have a MYSQL database with table ZIP_CODES, and columns zip, state (2 letters), city, longitude, latitude, and full_state
My aim is to have a form where people can search for other users' listings by city or zip code, have those results returned, and have the option to show more listings within 10, 15, 25 etc miles. I've been searching all over these forums+google and everything seems to be outdated or not working.
I'm guessing that a function could be created that handled this math, some complex algorithm or maybe not. Does anyone have any experience with this? thanks.
My aim is to have a form where people can search for other users' listings by city or zip code, have those results returned, and have the option to show more listings within 10, 15, 25 etc miles. I've been searching all over these forums+google and everything seems to be outdated or not working.
I'm guessing that a function could be created that handled this math, some complex algorithm or maybe not. Does anyone have any experience with this? thanks.