Hi,
I'm a bit baffled about a "bug" I've found with my map code. The following query is being run:
..and a link isn't being included properly in the result
If I just run this code so that I can see that link + the distance, the "distance" value is blank!!!
..shows:
You can see this in the image in this post.
Anyone got any ideas? The values seem ok for the lat/lng, but it just doesn't seem to be getting the distance value ( which is why its not showing up in my results)
TIA!
Andy
I'm a bit baffled about a "bug" I've found with my map code. The following query is being run:
Code:
SELECT ID,Title, ( 6371 * acos( cos( radians('41.7282358') ) * cos( radians( Latitude ) ) * cos( radians( Longitude ) - radians('9.212059299999964') ) + sin( radians('41.7282358') ) * sin( radians( Latitude ) ) ) ) AS distance
FROM glinks_Links link WHERE link.Latitude BETWEEN 41.0282358 AND 42.4282358 AND link.Longitude BETWEEN 8.11205929999996 AND 10.3120593 ORDER BY distance WHERE distance < 100 LIMIT 1000
..and a link isn't being included properly in the result
If I just run this code so that I can see that link + the distance, the "distance" value is blank!!!
Code:
SELECT ID,Title, ( 6371 * acos( cos( radians('41.7282358') ) * cos( radians( Latitude ) ) * cos( radians( Longitude ) - radians('9.212059299999964') ) + sin( radians('41.7282358') ) * sin( radians( Latitude ) ) ) ) AS distance
FROM glinks_Links link WHERE link.Latitude BETWEEN 41.0282358 AND 42.4282358 AND link.Longitude BETWEEN 8.11205929999996 AND 10.3120593 ORDER BY distance WHERE distance < 100 LIMIT 1000
..shows:
Code:
| 41269 | Aux Bords du Temps | 41.728235800000000000000000000000 | 9.212059300000000000000000000000 |
You can see this in the image in this post.
Anyone got any ideas? The values seem ok for the lat/lng, but it just doesn't seem to be getting the distance value ( which is why its not showing up in my results)
TIA!
Andy