title: Finding ZIP codes/coordinates for listings within a radius of another ZIP code using Long/Lat coordinates
body: <p>I want to find all listings within an arbitrary radius of a ZIP code. e.g. 10 miles from 90210, 100 miles from 00603, etc.</p>
  
  <p>If my query is "10 miles from 90210", I want to return all the listings that are within this 10-mile radius. The listings are also ZIP codes, so I essentially want to find all the other ZIP codes within this 10-mile radius. </p>
  
  <p>I think once I have collected all the ZIP codes in the radius, then I add them into an array, and then use SQL to find all listings that have the ZIP codes in this array. However, I am not sure if this is the best way it's done. </p>
  
  <p>I have tried to do research, but it gets very complex for me; I think it may have something to do with a Great Circle. I have been looking into the Aviation formulas too at <a href="http://williams.best.vwh.net/avform.htm" rel="nofollow noreferrer">http://williams.best.vwh.net/avform.htm</a>, but still can't work anything out.</p>
  
  <p>I have a database of ZIP codes containing the longitude and latitude of all ZIP codes, along with city and state info. This is enough info for what I need. I guess I just need to know the math; I don't want to use an API.</p>
  
  <p>I am absolutely lost here, on how I go about calculating such radii.</p>