Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-16-2014, 10:51 PM #1
- Join Date
- Oct 2010
- Florence, MS
- Thanked 33 Times in 32 Posts
Getting closest school by zipcode
Okay, so I have a database of zipcodes with the following schema:
Then, a list of high schools with the following schema:
I have the query to pull all schools by coordinates(longitude and latitude) with a 30mile radius. But what I am having trouble with is pulling a list of school in a 30 mile radius by inputting a central zipcode. Any ideas, on how I could do this without having two separate queries??Notice: If you post a problem and it gets fixed, please remember to go back and place it as solved. ;)
I always recommend the HEAD First series of books for learning a new coding language. ^_^
03-18-2014, 04:35 PM #2
- Join Date
- Jan 2011
- Thanked 755 Times in 753 Posts
Your database of zipcodes should have a column with the zip codes so entering a zip code yields the long/lat to use for the central point.
Evolution - The non-random survival of random variants.
Because I love FLEXBOX and tired of waiting: http://davidwalsh.name/goodbye-vendor-prefixes