title: Find top "n" nearby coordinates
body: <p>I have a coordinate. I want to find the top "n" (n being a variable value) nearest coordinates out of several thousand rows stored on a MySQL database. I also want to be able to define maximum and minimum distances between the coordinate in question and the coordinates in the database.</p>
  
  <p>How best am I to go about this? Would it be bonkers to use PHP as I understand the syntax much better than MySQL?</p>
  
  <p>If I use a MySQL function, how do I move it between databases if I choose to switch servers? How is it stored?</p>
  
  <p>Lastly, what is the most efficient method of getting through all these coordinates <b>accurately</b> - the coordinates are all relatively close to one another?</p>
  
  <p>Thanks for your time,</p>
  
  <p>John.</p>