For the purposes of my application, i am using google maps so that: A user will mark at the map the place where he stays (it is stored to the db). Then when he views the map again, it should show other users who stay near to him.
The coordinates are stored at a db field of users named eg coords
, at this form: 22.515578,33.265897 (latitude,longitude)
What should be the query so that to find all marks which are +/- 1 (or any other distance) from him?? (Eg if he is at 22.515578,33.265897 then it should search for others which are eg at 21.515578,32.265897 or 23.515578,34.265897)
Thanks in advance!