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)

1,181 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
  333. Pingback: anal sex kit
  334. Pingback: cozaar
  335. Pingback: knowledge
  336. Pingback: peliculas online
  337. Pingback: male extender
  338. Pingback: Vidalista 40mg
  339. Pingback: Escort amsterdam
  340. Pingback: Book a escort
  341. Pingback: Kinokrad
  342. Pingback: filmy-kinokrad
  343. Pingback: kinokrad-2019
  344. Pingback: serial
  345. Pingback: HND 753
  346. Pingback: dual vibrator
  347. Pingback: wand massager
  348. Pingback: clit sex toys
  349. Pingback: dildo
  350. Pingback: all my sex toys
  351. Pingback: Famous hunters
  352. Pingback: GENM 023
  353. Pingback: seo publissoft
  354. Pingback: hammer pulverizer
  355. Pingback: dildo review
  356. Pingback: uq blackboard
  357. Pingback: restaurant prices
  358. Pingback: cerialest.ru
  359. Pingback: Mesothelioma
  360. Pingback: VIAGRA
  361. Pingback: double bitcoin
  362. Pingback: robux gift card
  363. Pingback: pocket masturbator
  364. Pingback: #landscape
  365. Pingback: descargasmix
  366. Pingback: best dildos
  367. Pingback: dildo
  368. Pingback: dildo sex toy
  369. Pingback: massage vibrator
  370. Pingback: cheap hotels
  371. Pingback: blackhat seo links
  372. Pingback: Face
  373. Pingback: magic wand
  374. Pingback: 토토웹
  375. Pingback: Google
  376. Pingback: heirloom seeds
  377. Pingback: Donovan
  378. Pingback: 123movies
  379. Pingback: fur handcuff
  380. Pingback: rabbit vibrator
  381. Pingback: 더킹카지노
  382. Pingback: 퍼스트카지노
  383. Pingback: 우리카지노
  384. Pingback: diet
  385. Pingback: 코인카지노
  386. Pingback: 예스카지노
  387. Pingback: prostate sex toys
  388. Pingback: VIAGRA
  389. Pingback: FREE SEX
  390. Pingback: web designing
  391. Pingback: Pizza near me
  392. Pingback: best dildo
  393. Pingback: realistic stroker
  394. Pingback: cbd
  395. Pingback: luxury sex toys
  396. Pingback: prowizja/prowizji
  397. Pingback: porn
  398. Pingback: fingo nubby
  399. Pingback: Dog Bandanas
  400. Pingback: nike coupon
  401. Pingback: phen375
  402. Pingback: womanizer massager
  403. Pingback: suction cup dildo
  404. Pingback: robux generator
  405. Pingback: VIAGRA
  406. Pingback: bofilm
  407. Pingback: 1 seriya
  408. Pingback: realistic dong
  409. Pingback: anal play
  410. Pingback: pocket vagina
  411. Pingback: prostate sex toy
  412. Pingback: PORN DOWNLOAD
  413. Pingback: XXX VIDEO
  414. Pingback: robux promo codes
  415. Pingback: CHEAP VIAGRA
  416. Pingback: generic cialis
  417. Pingback: CRAZYSHIT.CoM
  418. Pingback: SEO
  419. Pingback: mua quần áo
  420. Pingback: blog.colnect.com
  421. Pingback: BUY VIAGRA
  422. Pingback: Anime Batch
  423. Pingback: topedstoreusa.com
  424. Pingback: FREE SEX VIDEOS
  425. Pingback: Search Tempo
  426. Pingback: CHEAP SEX OFFLINE
  427. Pingback: کوس
  428. Pingback: samoderzhavec
  429. Pingback: male sex toy
  430. Pingback: strap on dildo
  431. Pingback: cbd oil for sleep
  432. Pingback: how to use a dildo
  433. Pingback: PORN VIDEO
  434. Pingback: biography wiki
  435. Pingback: g gasm rabbit
  436. Pingback: anal vibrator
  437. Pingback: FREE XXX VIDEO
  438. Pingback: butt plug reviews
  439. Pingback: prostate massager
  440. Pingback: pocket pussy
  441. Pingback: remote underwear
  442. Pingback: butt sex toys
  443. Pingback: best g spot dildo
  444. Pingback: BUY VIAGRA
  445. Pingback: Naija songs
  446. Pingback: hqcialismht.com
  447. Pingback: butt plug
  448. Pingback: puppy training
  449. Pingback: ABP-938
  450. Pingback: SSNI-672
  451. Pingback: terjemahan
  452. Pingback: website
  453. Pingback: SEX TOYS
  454. Pingback: lindamedic.com
  455. Pingback: legionella test
  456. Pingback: myonlinebuy.us
  457. Pingback: 더나인카지노
  458. Pingback: strap on
  459. Pingback: SKMJ 083
  460. Pingback: veporn
  461. Pingback: righteous
  462. Pingback: 우리카지노
  463. Pingback: 예스카지노
  464. Pingback: 퍼스트카지노
  465. Pingback: 더나인카지노
  466. Pingback: 더킹카지노
  467. Pingback: 코인카지노
  468. Pingback: Why. Who
  469. Pingback: CCRMG
  470. Pingback: VIAGRA
  471. Pingback: penis ring
  472. Pingback: ssexy
  473. Pingback: sexlive
  474. Pingback: Jumpstart car
  475. Pingback: powerdirector 2018
  476. Pingback: FCMB BANK
  477. Pingback: Google
  478. Pingback: prostate vibrator
  479. Pingback: satisfyer vibrator
  480. Pingback: classic vibrators
  481. Pingback: powerful massager
  482. Pingback: genericvgrmax.com
  483. Pingback: CHEAP VIAGRA
  484. Pingback: best rabbit vibe
  485. Pingback: cock ring
  486. Pingback: BDSM
  487. Pingback: penis rings
  488. Pingback: lubricant for men
  489. Pingback: LEVITRA CHEAP
  490. Pingback: sexy lingerie
  491. Pingback: artwork digitizing
  492. Pingback: Rc shopping
  493. Pingback: Vanguard Newspaper
  494. Pingback: State Tourism
  495. Pingback: dank vapes carts
  496. Pingback: butt plugs
  497. Pingback: clit sex toys
  498. Pingback: using a dildo
  499. Pingback: bluetooth panties
  500. Pingback: top wand vibrators
  501. Pingback: canpharmb3.com
  502. Pingback: gay sohbet
  503. Pingback: magic store
  504. Pingback: popeyes menu
  505. Pingback: myaccountaccess
  506. Pingback: 4serial.com
  507. Pingback: See-Season-1
  508. Pingback: Evil-Season-1
  509. Pingback: Evil-Season-2
  510. Pingback: Evil-Season-3
  511. Pingback: Evil-Season-4
  512. Pingback: Dollface-Season-1
  513. Pingback: lg ge24lu20
  514. Pingback: jegoist antonim
  515. Pingback: viapwronline.com
  516. Pingback: Age
  517. Pingback: souvenirs store
  518. Pingback: increase DR
  519. Pingback: Zügelofferte
  520. Pingback: jetsurf
  521. Pingback: walmart wire
  522. Pingback: aspire to money
  523. Pingback: easy science
  524. Pingback: best cbd gummies
  525. Pingback: Nairaland Politics
  526. Pingback: University
  527. Pingback: Meaning of Odogwu
  528. Pingback: Anambrablog.ng
  529. Pingback: Naija
  530. Pingback: Cenforce 150mg
  531. Pingback: sex room
  532. Pingback: directory
  533. Pingback: sous traitance web
  534. Pingback: strap-on dildo
  535. Pingback: dildo
  536. Pingback: rabbit vibrator
  537. Pingback: sous traitance web
  538. Pingback: best cbd capsules
  539. Pingback: cbd near me
  540. Pingback: ehlers danlos
  541. Pingback: best cbd gummies
  542. Pingback: Real money
  543. Pingback: buying lsd online
  544. Pingback: island invest
  545. Pingback: THE CAMERA GUYS
  546. Pingback: wand massagers
  547. Pingback: realistic dildo
  548. Pingback: seo manchester
  549. Pingback: mimai beach
  550. Pingback: serial 2020
  551. Pingback: Dailymotion
  552. Pingback: Watch+movies+2020
  553. Pingback: "weight loss"
  554. Pingback: tail butt plugs
  555. Pingback: Genfio.com
  556. Pingback: fioricet2020.com
  557. Pingback: Free Ads
  558. Pingback: hack credit cards
  559. Pingback: نقل عفش
  560. Pingback: free porn
  561. Pingback: cannabidiol
  562. Pingback: website
  563. Pingback: Vaping deals
  564. Pingback: vibrator
  565. Pingback: trading
  566. Pingback: penis pump
  567. Pingback: Weed Strains
  568. Pingback: Dank Carts
  569. Pingback: tvrv.ru
  570. Pingback: 1plus1serial.site
  571. Pingback: #1plus1
  572. Pingback: 1plus1
  573. Pingback: 2020
  574. Pingback: Visit website
  575. Pingback: Marijuana
  576. Pingback: khaadi lawn
  577. Pingback: live news
  578. Pingback: Cool gadgets
  579. Pingback: thrusting anal toy
  580. Pingback: increase DR fast
  581. Pingback: ciekawy artykul
  582. Pingback: viagra
  583. Pingback: viagra
  584. Pingback: viagra
  585. Pingback: Sebrina Weiss
  586. Pingback: Film
  587. Pingback: Film 2020
  588. Pingback: Film 2021
  589. Pingback: CBD oil for pain
  590. Pingback: cannais oil
  591. Pingback: cannabis research
  592. Pingback: HellPorno
  593. Pingback: Buy weed online
  594. Pingback: Weed Wax
  595. Pingback: Bath Salts
  596. Pingback: Medical Marijuana
  597. Pingback: THC Oil
  598. Pingback: click here
  599. Pingback: reshp xxx
  600. Pingback: strapon dildo
  601. Pingback: Cherry Pie Strain
  602. Pingback: Laxmi Nagar
  603. Pingback: نقل عفش
  604. Pingback: cbd gummies
  605. Pingback: cannabidiol oil
  606. Pingback: buy google hack
  607. Pingback: SEO
  608. Pingback: fda us agent
  609. Pingback: matryoshka
  610. Pingback: Notarias en cancun
  611. Pingback: realistic dildo
  612. Pingback: Ontario Music
  613. Pingback: Flooring
  614. Pingback: Men duffle bag
  615. Pingback: Smoke shops
  616. Pingback: cold war lyrics
  617. Pingback: hack robux
  618. Pingback: INDIA VISA ONLINE
  619. Pingback: PayPal smm panel
  620. Pingback: good lawyer
  621. Pingback: human design
  622. Pingback: dizajn cheloveka
  623. Pingback: human-design-space
  624. Pingback: indian visa online
  625. Pingback: Melanie Bowen
  626. Pingback: russian male names

Leave a Reply