请帮我写mysql查询。这样我就只能获取谷歌地图可见区域的记录。
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var nelat = northEast.lat();
var nelng = northEast.lng();
var swlat = southWest.lat();
var swlng = southWest.lng();
我只想为地图可见区域加载记录。请在我的mysql查询下面找到。它适用于亚太地区,而不适用于欧洲和美洲。
SELECT * FROM listings WHERE latitude BETWEEN '".trim($_GET['swlat'])."' AND '".trim($_GET['nelat'])."' AND longitude BETWEEN '".trim($_GET['nelng'])."' AND '".trim($_GET['swlng'])."'