js如下: // 方法定义 lat,lng function GetDistance( lat1, lng1, lat2, lng2){ var radLat1 = lat1*Math.PI / 180.0; var radLat2 = lat2*Math.PI / 180.0; var a = radLat1 - radLat2; var b = lng1*Math.PI / 180.0 - lng2*Math.PI / 180.0; var s = 2 * M
select *,(2 * 6378.137* ASIN(SQRT(POW(SIN(PI()*(111.86141967773438-latitude)/360),2)+COS(PI()*33.07078170776367/180)* COS(latitude * PI()/180)*POW(SIN(PI()*(33.07078170776367-longitude)/360),2)))) as juli from school_base_infoorder by juli asc limit