Fatal error: Uncaught mysqli_sql_exception: 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 'AND end_date IS NOT NULL ORDER BY anyo ASC' at line 4 in /var/www/vhosts/gestoapp.com/projects.gestoapp.com/functions.php:349 Stack trace: #0 /var/www/vhosts/gestoapp.com/projects.gestoapp.com/functions.php(349): mysqli->query() #1 /var/www/vhosts/gestoapp.com/projects.gestoapp.com/functions.php(309): get_years() #2 /var/www/vhosts/gestoapp.com/projects.gestoapp.com/index.php(72): include('...') #3 {main} thrown in /var/www/vhosts/gestoapp.com/projects.gestoapp.com/functions.php on line 349