I've a problem. I want to get the nearest points on google map in android app. Different points/coordinates are stored in sqlite database. And I have to get the nearest 5 from them. The Query I'm using is:
SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < 25 ORDER BY distance LIMIT 0 , 5;
But I'm getting an error i.e. "no such function: acos exists".
What will be its proper solution
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…