Fatal error: Uncaught Exception: 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) * COS(ABS(latitude) * PI()/180) * POWER(SIN((-longitude) * PI()/1...' at line 2<br />Error No: 1064<br />SELECT *, 3956 * 2 * ASIN(SQRT(POWER(SIN((-ABS(latitude)) * PI()/180/2),2) + COS( * PI()/180) * COS(ABS(latitude) * PI()/180) * POWER(SIN((-longitude) * PI()/180/2),2))) AS distance FROM rs_obce AS loc WHERE longitude BETWEEN (-30 / ABS(COS(RADIANS())*69)) AND (+30 / ABS(COS(RADIANS()) * 69))AND latitude BETWEEN (-(30/69)) AND (+(30/69)) HAVING distance < 30 ORDER BY distance ASC in /home/html/altagric.sk/public_html/system/storage/modification/system/library/db/mysqli.php:47 Stack trace: #0 /home/html/altagric.sk/public_html/system/library/db.php(16): DB\MySQLi->query('SELECT *,\n ...', Array) #1 /home/html/altagric.sk/public in /home/html/altagric.sk/public_html/system/storage/modification/system/library/db/mysqli.php on line 47