SELECT
id,
(
3959 *
acos(cos(radians(37)) *
cos(radians(lat)) *
cos(radians(lng) -
radians(-122)) +
sin(radians(37)) *
sin(radians(lat )))
) AS distance
FROM markers
HAVING distance < 29 and distance > 28
ORDER BY distance LIMIT 0, 20;
Code Example |
---|
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
:: |
Sql :: rails sql query converstion |
:: |
:: |
:: |
:: |
Javascript :: how to find the current year in javascript |
Javascript :: |
Javascript :: |
:: |
:: |
:: |
:: |
:: |
Javascript :: |
:: ajax get request |
:: |