title: Elegant way of finding items within a latitude / longitude rectangle in an MySQL database?
body: <p>I have a MySQL database where each record contains, as well as many other things, a latitude and longitude. At the moment these are of type TEXT, though I would be happy to change this if necessary. One variable each for latitude and longitude, ie</p>
  
  <pre><code>latitude:  51.258215
  longitude: -0.123456
  </code></pre>
  
  <p>So what I would like to know is the fastest, most elegant way of getting a list of records when a php script receives four POST variables... co-ords representing the top-left and bottom-right corners of a rectangle on a map..? Are there any ways to get the speed really optimised for this?</p>