title: Get nearest locations using latitude and longitude
body: <p>I have a table <code>hotspots</code></p>
  
  <pre><code>id  name  date
  1   foo   2011-06-15 15:10:34
  2   bar   2011-07-02 16:45:18
  </code></pre>
  
  <p>And a table <code>locations</code></p>
  
  <pre><code>hotspotid  zipcode  latitude  longitude
  1          90001    xxxxx     xxxxx
  2          45802    xxxxx     xxxxx
  </code></pre>
  
  <p>How can i list the hotspots nearby to a specific latitude and longitude with miles limit using an SQL query?</p>
  
  <p>P.S. i'd like a pure SQL solution but php is ok if it's needed.</p>
  
  <p>Thanks</p>