Calendario

SELECT * FROM ( SELECT z.name, z.descr, z.associazione, z.start, z.end, z.longitude, z.latitude, z.cover_url, p.radius, p.distance_unit * DEGREES(ACOS(COS(RADIANS(p.latpoint)) * COS(RADIANS(z.latitude)) * COS(RADIANS(p.longpoint - z.longitude)) + SIN(RADIANS(p.latpoint)) * SIN(RADIANS(z.latitude)))) AS distance FROM wp_map_calendar_events AS z JOIN ( SELECT 39.043701171875 AS latpoint, -77.474197387695 AS longpoint, 200 AS radius, 111.045 AS distance_unit ) AS p ON 1=1 WHERE z.latitude BETWEEN p.latpoint - (p.radius / p.distance_unit) AND p.latpoint + (p.radius / p.distance_unit) AND z.longitude BETWEEN p.longpoint - (p.radius / (p.distance_unit * COS(RADIANS(p.latpoint)))) AND p.longpoint + (p.radius / (p.distance_unit * COS(RADIANS(p.latpoint)))) ) AS d WHERE distance <= radius AND start BETWEEN CAST('2019-12-13' AS DATE) AND CAST('2020-01-12' AS DATE) ORDER BY distance
Abbiamo trovato: 0 risultati!