I would like to find any records that are within a specific RANGE (in feet) of a specific LAT and LON (parameters) from a MySQL database.
For example, I would specify the following in the MySQL query (php created so $variables preferred).
$latititude = 23.155177;
$longitude = 23.378906;
$range_in_feet = 400;
$params = calculations go here and conversions to make the parameters work.
$sql = "SELECT lat, long FROM table WHERE ' . $params . ' AND datetimestamp BETWEEN '2012-02-03' AND '2012-02-04';";
$results = mysql_query($sql);
There is no "feet" recorded in the MySQL table; only Latitude and Longitude GPS co-ords along with a Date & Timestamp (UNIX format), and an index field unique integer.
Ideally, the resultset should not be exact, but to allow for a plus/minus fuzzy logic range.