MySQL calculate distance between two latitude/longitude coordinates

–Returns the distance in kilometers, assuming an earth radius of 6,371 km.

SELECT D.idx,D.name,( 6371 * ACOS( COS( RADIANS(C.latitude) ) * COS( RADIANS( D.latitude ) ) * COS( RADIANS( D.longitude ) - RADIANS(C.longitude) ) + SIN( RADIANS(C.latitude) ) * SIN( RADIANS( D.latitude ) ) ) ) AS kms
FROM dealers D,cities C
	GROUP BY D.idx
	ORDER BY kms 

// you need to have co-ordinates of 2 places (in this case it is dealer location and city)

649 thoughts on “MySQL calculate distance between two latitude/longitude coordinates

  1. Pingback: Google
  2. Pingback: 토토사이트
  3. Pingback: 사다리사이트
  4. Pingback: 먹튀검증
  5. Pingback: 안전놀이터
  6. Pingback: realistic vibrator
  7. Pingback: first dildo
  8. Pingback: Google
  9. Pingback: beast tv apk
  10. Pingback: store
  11. Pingback: double headed dong
  12. Pingback: порно чат
  13. Pingback: 메이저공원
  14. Pingback: 사설토토
  15. Pingback: cursos online
  16. Pingback: fbv cursos online
  17. Pingback: fishing equipment
  18. Pingback: bondage sex kit
  19. Pingback: kegel massager
  20. Pingback: bunny vibrator
  21. Pingback: printers
  22. Pingback: FIFA 19 Coins
  23. Pingback: Chicago SEO
  24. Pingback: Chicago SEO
  25. Pingback: detox tea
  26. Pingback: curso online
  27. Pingback: chwilówki
  28. Pingback: iphone repair
  29. Pingback: male sex sleeve
  30. Pingback: Google
  31. Pingback: bbw dildo
  32. Pingback: dildo
  33. Pingback: milking toy
  34. Pingback: website
  35. Pingback: workfromhome2019
  36. Pingback: los angeles seo
  37. Pingback: xxx
  38. Pingback: Anal
  39. Pingback: Lawn
  40. Pingback: penis enlargement
  41. Pingback: anal plugs reviews
  42. Pingback: strap on
  43. Pingback: 188bet
  44. Pingback: fun88
  45. Pingback: play free pc games
  46. Pingback: rijpe vrouw
  47. Pingback: webcamsex
  48. Pingback: торб
  49. Pingback: cameras ao vivo
  50. Pingback: rencontres sexe
  51. Pingback: anal plug set
  52. Pingback: gay bum cleaning
  53. Pingback: Waterbaan prijs
  54. Pingback: Acronis Cracks
  55. Pingback: bullet vibe
  56. Pingback: couples sex toys
  57. Pingback: pc games download
  58. Pingback: Times of India
  59. Pingback: cock gay
  60. Pingback: shemale sexdate
  61. Pingback: filles coquin
  62. Pingback: sexe webcam
  63. Pingback: first time anal
  64. Pingback: the thrusting vibe
  65. Pingback: real penis dildo
  66. Pingback: masturbator
  67. Pingback: lenovo h50 manual
  68. Pingback: 6.3.10w2
  69. Pingback: sex toy store
  70. Pingback: prostate vibrator
  71. Pingback: silicone dildo
  72. Pingback: anal douche
  73. Pingback: anal butt plugs
  74. Pingback: Avandra-100
  75. Pingback: AutoCAD Discount
  76. Pingback: ed pump
  77. Pingback: dp ring
  78. Pingback: ben wa balls
  79. Pingback: big dildo review
  80. Pingback: vibrating kegels
  81. Pingback: pleasure panty
  82. Pingback: blockchain advisor
  83. Pingback: satta king
  84. Pingback: double bullet vibe
  85. Pingback: clit tickler
  86. Pingback: Ashlyn brooke mold
  87. Pingback: double dong
  88. Pingback: g spot toy
  89. Pingback: bullet vibrator
  90. Pingback: dildo set
  91. Pingback: male masturbator
  92. Pingback: porn
  93. Pingback: porn land
  94. Pingback: g-spot vibrator
  95. Pingback: penis sex toy
  96. Pingback: suction cup dildo
  97. Pingback: pocket stroker
  98. Pingback: legal
  99. Pingback: ssru.ac.th
  100. Pingback: bunny vibrator
  101. Pingback: male masturbators
  102. Pingback: big black dildo
  103. Pingback: vibrator for her
  104. Pingback: bondage toys
  105. Pingback: Goedkoopste barbie
  106. Pingback: porn land
  107. Pingback: giant dildo orgasm
  108. Pingback: sex costume
  109. Pingback: hundejakke
  110. Pingback: Julia Ann
  111. Pingback: Pakistani Suits
  112. Pingback: sexboer
  113. Pingback: geile sex filmpjes
  114. Pingback: porno files
  115. Pingback: gratis films
  116. Pingback: iptv 7+
  117. Pingback: liteblue login
  118. Pingback: liteblue
  119. Pingback: homemade vibrator
  120. Pingback: 7 inches dildo
  121. Pingback: virtual visa card
  122. Pingback: cvthl
  123. Pingback: beach
  124. Pingback: hundebur
  125. Pingback: sex toy collection
  126. Pingback: walmartone
  127. Pingback: www.hotmail.fr
  128. Pingback: pink vibrator
  129. Pingback: bondage gear
  130. Pingback: wand massager
  131. Pingback: best anal sex lube
  132. Pingback: podcast
  133. Pingback: BWI transportation
  134. Pingback: vibrator reviews
  135. Pingback: good blow job
  136. Pingback: cock rings
  137. Pingback: 바카라사이트
  138. Pingback: Hotmail Sign In
  139. Pingback: Hotmail login
  140. Pingback: 15% minoxidil
  141. Pingback: internet marketing
  142. Pingback: briefs
  143. Pingback: his and hers toys
  144. Pingback: penis vibrator
  145. Pingback: iraniporn
  146. Pingback: MIDE-675
  147. Pingback: mp3 download
  148. Pingback: security
  149. Pingback: nigerian mp3
  150. Pingback: pppd 780
  151. Pingback: SSNI-542
  152. Pingback: glass anal plugs
  153. Pingback: anal starter kit
  154. Pingback: Instagram Likes
  155. Pingback: south coast seo
  156. Pingback: gay dildo fuck
  157. Pingback: best anal douches
  158. Pingback: rctd 260
  159. Pingback: big wand massager
  160. Pingback: btc to neteller
  161. Pingback: stiiizy pods
  162. Pingback: Eweka
  163. Pingback: minyak kelapa VCO
  164. Pingback: one.walmart.com
  165. Pingback: bullet for woman
  166. Pingback: ginger dank
  167. Pingback: Packwoods
  168. Pingback: Dank Vapes
  169. Pingback: baking cakes kenya
  170. Pingback: Order marijuana
  171. Pingback: Tramadol Sale
  172. Pingback: ABP 897
  173. Pingback: runelite
  174. Pingback: mygiftcardsite.com
  175. Pingback: Beautiful t shirts
  176. Pingback: MEYD 529
  177. Pingback: anal toys
  178. Pingback: Ioe business
  179. Pingback: Proshow Gold Crack
  180. Pingback: sex restraints
  181. Pingback: bondage cuffs
  182. Pingback: gay lubricant
  183. Pingback: dank vapes
  184. Pingback: IPX-369
  185. Pingback: Judi Slot Online
  186. Pingback: gold investments
  187. Pingback: SEO Vancouver
  188. Pingback: PPPD-789
  189. Pingback: daftar joker123
  190. Pingback: best female toys
  191. Pingback: GVG 941
  192. Pingback: Juhu Escorts
  193. Pingback: apps for pc
  194. Pingback: pegging stories
  195. Pingback: silicone rabbit
  196. Pingback: campaigns
  197. Pingback: milfgilf xxx
  198. Pingback: DKN 014
  199. Pingback: CAWD-016
  200. Pingback: ball brothers
  201. Pingback: sewa led
  202. Pingback: سكس
  203. Pingback: nipple suckers
  204. Pingback: outlook sign in
  205. Pingback: sneaker
  206. Pingback: wegmans schedule
  207. Pingback: سکس گی
  208. Pingback: courier to iran
  209. Pingback: Vape shops near me
  210. Pingback: pc games download
  211. Pingback: wordpress
  212. Pingback: MIDE 687
  213. Pingback: WANZ 898
  214. Pingback: xxx
  215. Pingback: thc vape oil
  216. Pingback: Vape shop
  217. Pingback: Mariann Mcdavis
  218. Pingback: DOCP-175
  219. Pingback: liteblue usps gov
  220. Pingback: ATID 370
  221. Pingback: remote control egg
  222. Pingback: best penis ring
  223. Pingback: buy ambien online
  224. Pingback: bullet massager
  225. Pingback: credit card
  226. Pingback: watch repair
  227. Pingback: iTunes
  228. Pingback: oxycontin for sale
  229. Pingback: app apk for pc
  230. Pingback: Best smm panel
  231. Pingback: anal training
  232. Pingback: Supreme cartridges
  233. Pingback: app apk for pc
  234. Pingback: Buy marijuana
  235. Pingback: realistic dildo
  236. Pingback: sex toy anal
  237. Pingback: Century Sankya
  238. Pingback: asmr rubbing
  239. Pingback: buy viagra
  240. Pingback: dildo
  241. Pingback: magic wand review
  242. Pingback: venus butterfly
  243. Pingback: porn
  244. Pingback: cbd for sale
  245. Pingback: cbd oil for sale
  246. Pingback: cialis
  247. Pingback: buy lipitor online
  248. Pingback: stopoverdoseil.org
  249. Pingback: how to use a dildo
  250. Pingback: TADACIP (1X4)
  251. Pingback: Anti acne cream
  252. Pingback: smm panels
  253. Pingback: ball gag
  254. Pingback: bondage restraints
  255. Pingback: luxury vibrator
  256. Pingback: pegging dildo
  257. Pingback: penis extenders
  258. Pingback: rabbit vibrators
  259. Pingback: vibrating dildo
  260. Pingback: clone a penis
  261. Pingback: سکس گروهی
  262. Pingback: CMRU
  263. Pingback: Kiara Advani Album
  264. Pingback: viagra
  265. Pingback: viagra
  266. Pingback: viagra
  267. Pingback: viagra
  268. Pingback: viagra
  269. Pingback: viagra
  270. Pingback: viagra
  271. Pingback: viagra
  272. Pingback: viagra
  273. Pingback: viagra 2019
  274. Pingback: hoblist
  275. Pingback: VIAGRA
  276. Pingback: personals
  277. Pingback: online surveys
  278. Pingback: best spins hack
  279. Pingback: VIAGRA
  280. Pingback: FREE V BUCKS
  281. Pingback: VIAGRA
  282. Pingback: dear mama
  283. Pingback: anal sex toys
  284. Pingback: dating
  285. Pingback: RSOnline 20
  286. Pingback: lesbian dildo
  287. Pingback: mastercard
  288. Pingback: malaysia escorts
  289. Pingback: fantasy panty
  290. Pingback: FUCK
  291. Pingback: pornhub
  292. Pingback: bunny vibrator
  293. Pingback: sex tube
  294. Pingback: viagra for men
  295. Pingback: Top Media Markt
  296. Pingback: nude
  297. Pingback: viagra pills
  298. Pingback: warming rabbit
  299. Pingback: viagra for men
  300. Pingback: dpstreaming
  301. Pingback: x-rated
  302. Pingback: buy anal sex toys
  303. Pingback: dildo vibrator
  304. Pingback: best dildos
  305. Pingback: 먹튀 검증
  306. Pingback: 안전놀이터
  307. Pingback: 검증사이트
  308. Pingback: 먹튀폴리스
  309. Pingback: SEX
  310. Pingback: free robux Method
  311. Pingback: escort directory
  312. Pingback: bitcoin best
  313. Pingback: generic cialis
  314. Pingback: cozaar
  315. Pingback: sex
  316. Pingback: biaxin
  317. Pingback: Bond Cleaner
  318. Pingback: 토토메이저
  319. Pingback: 바카라사이트
  320. Pingback: cbd oil
  321. Pingback: huge dildos
  322. Pingback: Move Out Cleaners
  323. Pingback: Dog Pet Shop
  324. Pingback: regulation
  325. Pingback: viagra
  326. Pingback: CHEA VIAGRA ONLINE
  327. Pingback: stiiizy biiig
  328. Pingback: Sauna
  329. Pingback: Threema
  330. Pingback: Innovation
  331. Pingback: MVSD-410
  332. Pingback: SSNI-620

Leave a Reply