SQLSTATE[42000]: Syntax error or access violation: 1064 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 cp.enddate='2019-02-11 23:59:59' AND cp.var='avgt' order by thresh ASC' at line 1 with query: SELECT * FROM sercc.climper_strthr AS cp WHERE cp.station='317069' AND cp.period IN ('11_DAY','1_MONTH','42_DAY','73_DAY','3_MONTH','6_MONTH','1_YEAR') AND cp.thresh IN () AND cp.enddate='2019-02-11 23:59:59' AND cp.var='avgt' order by thresh ASC Trace: #0 /etc/httpd/autoload/scodb.php(144): PDO->prepare('SELECT * FROM s...') #1 /etc/httpd/autoload/scodb.php(459): scodb->query('SELECT * FROM s...', Array) #2 /home/www/html/climper/NewPerspectFunctions.php(4222): scodb_query(Object(scodb), 'SELECT * FROM s...') #3 /home/www/html/climper/ThreshPerspect.php(105): COOPThreshPerV3('317069', '2019-02-11', Array, 'avgt', NULL, 1, true, false, false) #4 {main} in rank_query line 1194