根据经纬度查询附近几公里的门店

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
 

猜你喜欢

转载自www.cnblogs.com/love1226/p/11345351.html