CLOUDS API Locations
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 'temp),"C","F"),1) as `value`,"F" as `unit`,DATE_FORMAT(MAX(ob),'%b %e %Y') as...' at line 1 with query: SELECT "airtempavg" as `variable`,"Surface 24 Hour Average Air Temperature " as `name`,"airtempavg2m" as `var_parent`,"2m" as `height`,"D" as `obtype`,"avg" as `paramtype`,ROUND(weather.ConvertUnit(AVG(COALESCE((tempmax24+tempmin24)/2),temp),"C","F"),1) as `value`,"F" as `unit`,DATE_FORMAT(MAX(ob),'%b %e %Y') as `time`,DATE_FORMAT(MIN(ob),'%b %e %Y') as `time_min`,DATE_FORMAT(MAX(ob),'%b %e %Y') as `time_max`,CONCAT(1+TIMESTAMPDIFF(DAY,DATE(MIN(ob)),DATE(MAX(ob))),' Days') as `time_diff` FROM cronos.hourly as d WHERE station="KAKH" AND ob >= DATE(DATE_SUB(NOW(), INTERVAL 1 DAY)) AND obtype IN ("D")

Error Trace:
#0 /etc/httpd/autoload/scodb/scodb_class.php(171): PDO->prepare('SELECT "airtemp...')
#1 /etc/httpd/autoload/scodb/scodb.php(519): scodb_class->query('SELECT "airtemp...', Array)
#2 /home/repositories/api_container/html/lib/data_parameter_functions.php(2475): scodb_query(Object(scodb_api_read), 'SELECT "airtemp...')
#3 /home/repositories/api_container/html/locations.php(572): pullParamData(Array, Array)
#4 /home/repositories/api_container/html/locations.php(416): ShowStationInfo('KAKH')
#5 {main} with sel_q: SELECT "airtempavg" as `variable`,"Surface 24 Hour Average Air Temperature " as `name`,"airtempavg2m" as `var_parent`,"2m" as `height`,"D" as `obtype`,"avg" as `paramtype`,ROUND(weather.ConvertUnit(AVG(COALESCE((tempmax24+tempmin24)/2),temp),"C","F"),1) as `value`,"F" as `unit`,DATE_FORMAT(MAX(ob),'%b %e %Y') as `time`,DATE_FORMAT(MIN(ob),'%b %e %Y') as `time_min`,DATE_FORMAT(MAX(ob),'%b %e %Y') as `time_max`,CONCAT(1+TIMESTAMPDIFF(DAY,DATE(MIN(ob)),DATE(MAX(ob))),' Days') as `time_diff` FROM cronos.hourly as d WHERE station="KAKH" AND ob >= DATE(DATE_SUB(NOW(), INTERVAL 1 DAY)) AND obtype IN ("D")