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 ') ORDER BY idx.file_name ASC' at line 15
SELECT idx.*, IF (data.file_title IS NOT NULL, data.file_title, '') AS file_title, IF (data.file_descr IS NOT NULL, data.file_descr, '') AS file_description, IF ( IS NOT NULL,, 0) AS video_data_id, IF (vdata.video_width IS NOT NULL, vdata.video_width, 0) AS video_width, IF (vdata.video_height IS NOT NULL, vdata.video_height, 0) AS video_height, NULL AS video_path, IF (vdata.video_thumbnail IS NOT NULL, vdata.video_thumbnail, 0) AS video_thumbnail, '' AS srcset_html, '' AS srcset_lazy , IF( IS NULL, 0, AS thumbS_processed_id , IF(prf0.identifier IS NULL, '/thumb.php?s', prf0.identifier) AS thumbS_path , IF(prf0.media_width IS NULL, '320', prf0.media_width) AS thumbS_width , IF(prf0.media_height IS NULL, '320', prf0.media_height) AS thumbS_height , 'optimized' AS thumbS_format , IF(prf0.created IS NULL, 0, prf0.created) AS thumbS_created , IF( IS NULL, 0, AS thumbM_processed_id , IF(prf1.identifier IS NULL, '/thumb.php?m', prf1.identifier) AS thumbM_path , IF(prf1.media_width IS NULL, '640', prf1.media_width) AS thumbM_width , IF(prf1.media_height IS NULL, '640', prf1.media_height) AS thumbM_height , 'optimized' AS thumbM_format , IF(prf1.created IS NULL, 0, prf1.created) AS thumbM_created , IF( IS NULL, 0, AS thumbL_processed_id , IF(prf2.identifier IS NULL, '/thumb.php?l', prf2.identifier) AS thumbL_path , IF(prf2.media_width IS NULL, '1024', prf2.media_width) AS thumbL_width , IF(prf2.media_height IS NULL, '1024', prf2.media_height) AS thumbL_height , 'optimized' AS thumbL_format , IF(prf2.created IS NULL, 0, prf2.created) AS thumbL_created , IF( IS NULL, 0, AS thumbXL_processed_id , IF(prf3.identifier IS NULL, '/thumb.php?xl', prf3.identifier) AS thumbXL_path , IF(prf3.media_width IS NULL, '1280', prf3.media_width) AS thumbXL_width , IF(prf3.media_height IS NULL, '1280', prf3.media_height) AS thumbXL_height , 'optimized' AS thumbXL_format , IF(prf3.created IS NULL, 0, prf3.created) AS thumbXL_created , IF( IS NULL, 0, AS lightbox_processed_id , IF(prf4.identifier IS NULL, '/thumb.php?xxl', prf4.identifier) AS lightbox_path , IF(prf4.media_width IS NULL, '1920', prf4.media_width) AS lightbox_width , IF(prf4.media_height IS NULL, '1080', prf4.media_height) AS lightbox_height , 'optimized' AS lightbox_format , IF(prf4.created IS NULL, 0, prf4.created) AS lightbox_created , IF( IS NULL, 0, AS slider_processed_id , IF(prf5.identifier IS NULL, '/thumb.php?xxl', prf5.identifier) AS slider_path , IF(prf5.media_width IS NULL, '2500', prf5.media_width) AS slider_width , IF(prf5.media_height IS NULL, '2500', prf5.media_height) AS slider_height , 'optimized' AS slider_format , IF(prf5.created IS NULL, 0, prf5.created) AS slider_created FROM media_file_index idx LEFT JOIN media_file_processed prf0 ON prf0.file_id = idx.file_id AND prf0.configuration_hash = '801c186be09e3148e04017c15fa00f95783c34f4' LEFT JOIN media_file_processed prf1 ON prf1.file_id = idx.file_id AND prf1.configuration_hash = '273cad344486550be8842af753011190d260263d' LEFT JOIN media_file_processed prf2 ON prf2.file_id = idx.file_id AND prf2.configuration_hash = '8c0e5cd54a3209bf915c499f4e82e7d75c383830' LEFT JOIN media_file_processed prf3 ON prf3.file_id = idx.file_id AND prf3.configuration_hash = '95f91da52477bab54607140f8698022751e09ea4' LEFT JOIN media_file_processed prf4 ON prf4.file_id = idx.file_id AND prf4.configuration_hash = 'c4b444468a36d087cc41dd4e184f812c5f40dbb1' LEFT JOIN media_file_processed prf5 ON prf5.file_id = idx.file_id AND prf5.configuration_hash = '614833484af5e2d8b29ff0a9855c74f7c384e6ab' LEFT JOIN media_file_data data ON data.file_id = idx.file_id AND data.language_id = '1' LEFT JOIN media_video_data vdata ON vdata.file_id = idx.file_id WHERE idx.file_id IN () ORDER BY idx.file_name ASC;