Display Options
Select Count(*) from (SELECT *, ((ACOS(SIN(39.0437 * PI() / 180) * SIN(latitude * PI() / 180) + COS(39.0437 * PI() / 180) * COS(latitude * PI() / 180) * COS((-77.4875 - longitude) * PI() / 180)) * 180 / PI()) * 60 * 1.1515) AS distance FROM siteslocal where (Item like '%zzzxxzzzzzz%')and replace(name,' ','') = 'RedTagSports' HAVING (distance<='50' or Special like '%Ashburn%') and started > DATE_SUB( NOW( ) , INTERVAL 7 DAY)) as q
SELECT *, ((ACOS(SIN(39.0437 * PI() / 180) * SIN(latitude * PI() / 180) + COS(39.0437 * PI() / 180) * COS(latitude * PI() / 180) * COS((-77.4875 - longitude) * PI() / 180)) * 180 / PI()) * 60 * 1.1515) AS distance FROM siteslocal where (Item like '%zzzxxzzzzzz%')and replace(name,' ','') = 'RedTagSports' HAVING (distance<='50' or Special like '%Ashburn%') and started > DATE_SUB( NOW( ) , INTERVAL 7 DAY)
SELECT *, ((ACOS(SIN(39.0437 * PI() / 180) * SIN(latitude * PI() / 180) + COS(39.0437 * PI() / 180) * COS(latitude * PI() / 180) * COS((-77.4875 - longitude) * PI() / 180)) * 180 / PI()) * 60 * 1.1515) AS distance FROM siteslocal where (Item like '%zzzxxzzzzzz%')and replace(name,' ','') = 'RedTagSports' HAVING (distance<='50' or Special like '%Ashburn%') and started > DATE_SUB( NOW( ) , INTERVAL 7 DAY)
































