Search
 
SCRIPT & CODE EXAMPLE
 

SQL

order records between two cordinates sql

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;
Comment

PREVIOUS NEXT
Code Example
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
Sql :: rails sql query converstion 
::  
::  
::  
::  
Javascript :: how to find the current year in javascript 
Javascript ::  
Javascript ::  
::  
::  
::  
::  
::  
Javascript ::  
:: ajax get request 
::  
ADD CONTENT
Topic
Content
Source link
Name
7+5 =