basically I have a database that is setup in Longitude and Latitude. I have been trying for hours now to fix an issue I have with MySql and I can not find my error. Here is the error I am getting:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '€“ longitude) * PI() / 180))* 180 / PI()) * 60 * 1.1515)*1.609344) AS distance' at line 1
Here is MySql database query to get the distances from long and lat:
$res = mysql_query("SELECT *, (((ACOS(SIN(".$latitude." * PI() / 180) * SIN(latitude *
PI() / 180) + COS(".$latitude." * PI() / 180) * COS(latitude * PI() / 180) *
COS((".$longitude." – longitude) * PI() / 180))* 180 / PI()) * 60 * 1.1515)*1.609344)
AS distance") or die(mysql_error());
Please please please help!!!