Posted By

jamesming on 11/28/08


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

ginoplusio
robe


MYSQL FORMULA TO LIST NEAREST LOCATIONS FROM TWO GEO COORDINATES


 / Published in: SQL
 

URL: http://www.petefreitag.com/item/622.cfm

  1. SELECT id, place_name,
  2. ROUND( SQRT( POW((69.1 * (#Val(arguments.latitude)# - latitude)), 2) + POW((53 * (#Val(arguments.longitude)# - longitude)), 2)), 1) AS distance
  3. FROM places

Report this snippet  

You need to login to post a comment.