根据经纬度查询附近几公里的门店(<5)代表5公里

select * from 表名 where status=1 and isopen =0 and jingyingtype=1 and waimai=1 and bstatus = 1 and (acos(sin(({$httpData['lat']}*3.1415)/180) * sin((lat*3.1415)/180) + cos(({$httpData['lat']}*3.1415)/180) * cos((lat*3.1415)/180) * cos(({$httpData['lng']}*3.1415)/180 - (lng*3.1415)/180))*6370.996)<=5

 

 
posted @ 2019-08-13 13:29  zwb8032fang  阅读(1223)  评论(0编辑  收藏  举报