Warning: Undefined array key "year" in /var/www/httpd-live/pubs/export_xml.php on line 13

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 '' at line 1 in /var/www/httpd-live/pubs/db_functions.php:20 Stack trace: #0 /var/www/httpd-live/pubs/db_functions.php(20): mysqli->query('select pub.id a...') #1 /var/www/httpd-live/pubs/db_functions.php(38): run_select_query('select pub.id a...') #2 /var/www/httpd-live/pubs/export_xml.php(14): get_pubs_by_year(NULL) #3 {main} thrown in /var/www/httpd-live/pubs/db_functions.php on line 20