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 >= 37.527318340947 AND cll.lat <= 40.418661659053 AND cll.long >= -80.845271659053 AND cll.long <= -77.953928340947) AS c GROUP BY c.name HAVING Proximity > 0 AND Proximity <= 100 ORDER BY Proximity ASC LIMIT 50