Find closest 10 cities with MySQL using latitude and longitude?
问题 I have searched the Web a lot to find the solution for my problem but I still can't figure it out. I have a very simple database with id, city name, latitude, longitude and city_info. When someone enters a city page a would like to show the 10 nearby cities. How can I calculate this with MySQL and return it with PHP? I have seen a lot of suggestions on this website, however none of these work somehow. What I tried without success. I do not get any results. <?php $slatitude = 43.2141341;