0

I have stored 20 location(locality or place) names in mysql.

The 20 location names are Ambattur,avadi,Korattur,pattaravakkam,pattabiram,lucas,villikvakkam,perambur,tiruttani,tiruvallur,Padi,Kolathur,tirumullaivoil,tirumangalam,annanagar,T.nagar,tambaram,guindy,mambalam,egmore.

Among the 20 locations Ambattur,avadi,pattabiram,Padi,Kolathur situate very close to each other in terms of distance.

Here I need PHP code to show all 5 locations(near locations(Ambattur,avadi,pattabiram,Padi,Kolathur)) when I search one location(Ambattur or avadi or pattabiram or padi or kolathur).

Please any one help me.

Suresh s.p
  • 29
  • 1
  • What state do you have for the location (e.g. latitude/longitude, etc.)? – Tim Biegeleisen Aug 12 '16 at 10:04
  • 2
    Possible duplicate of [How to get a list of suburbs surrounding a location then repeat for other locations using MySql?](http://stackoverflow.com/questions/38604316/how-to-get-a-list-of-suburbs-surrounding-a-location-then-repeat-for-other-locati) – e4c5 Aug 12 '16 at 10:06

1 Answers1

0

Automated way: Using google maps location services (If this comes in the scope of your application).

If the locations are very limited in count, you may maintain an associative table to map location with nearby location(s) and query that.

G S Bajaj
  • 84
  • 1
  • 7