0
這是我的數學:如何在PHP中將正數添加到負數中?
$range = 0.43218;
$this->location['longitude'] = -78.852972745895;
$this->location['latitude'] = 42.879424080703;
$minlong = $this->location['longitude']-$range;
$maxlong = $this->location['longitude']+$range;
$minlat = $this->location['latitude']-$range;
$maxlat = $this->location['latitude']+$range;
但我結束了這一點:
$minlong = -79.285152745895;
$maxlong = -78.420792745895;
$minlat = 42.447244080703;
$maxlat = 43.311604080703;
我試着用兩個原始緯度和經度的範圍內就結了,誰能幫我我的數學。我一整天都在用數字工作,他們在殺我!
然後我用這些來從數據庫中的數據,我的SQL是SELECT * FROM'Stores'那裏('Longitude' BETWEEN「 -79.285152745895'和'-78.420792745895')和('Latitude'BETWEEN'42.444242480703'和'43.31604080703')但是這不會返回任何結果,儘管應該有3個結果 – ldrrp
對我來說看起來不錯。你當前的結果有什麼問題? – Mike
繼承人鏈接到我的3個結果,應該顯示http://ft.trillian.im/bf33102d41b540ba92d5daba6e50e69018e5dc8a/6ipqYDjaNCHU9UuzI0It1gyTcB1eH.jpg – ldrrp