我正在尝试在查询中使用trig函数,并想知道这是否是正确的方式/甚至在本地存储中是否支持?
tx.executeSql('SELECT * FROM locations ORDER BY ACOS(COS(RADIANS(51.511214))*COS(RADIANS(locations.lat))*COS(RADIANS(locations.long)RADIANS(-0.119824))+SIN(RADIANS(51.511214))*SIN(RADIANS(locations.lat)) WHERE ROUND(locations.lat,3) LIKE 51.511214 AND ROUND(locations.long,2) LIKE -0.119824 LIMIT 0,5', [], Latlongquery, errorCB);
正如下面所指出的,我实际上是在谈论WebSQL,因为本地存储不支持查询。抱歉错误