mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.*pi()/180)) * sin((`Latitude`*pi()/180))+cos((38.97299.*pi()/180)) * cos((`L...' at line 1
SQL: SELECT c.name As 'City', c.abrev AS 'abrev', c.state as 'state', CONCAT(c.name, ', ', c.abrev) AS 'CityState', ROUND((((acos(sin((38.97299.*pi()/180)) * sin((`Latitude`*pi()/180))+cos((38.97299.*pi()/180)) * cos((`Latitude`*pi()/180)) * cos(((-79.3996- `Longitude`)*pi()/180))))*180/pi())*60*1.1515), 1) AS Proximity FROM (SELECT c.cityId, c.name, c.state as 'abrev', s.state as 'state', cll.lat, cll.lat AS Latitude, cll.long, cll.long as Longitude FROM cities c INNER JOIN city_lat_long cll ON cll.cityID = c.cityID INNER JOIN states AS s ON c.state=s.abrev WHERE cll.lat >= 38.250154170474 AND cll.lat <= 39.695825829526 AND cll.long >= -80.122435829526 AND cll.long <= -78.676764170474) AS c GROUP BY c.name HAVING Proximity > 0 AND Proximity <= 50 ORDER BY Proximity ASC LIMIT 50