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 ') - radians(local_longitude))) * 6378 as distanciaep FROM eve_loc_org WHERE CUR' at line 1