select product.* , attacheFiles.filename as listfilename , attacheFiles.filename_org as listfilename_org , attacheFiles.filename_alt as listfilename_alt from product left outer join attacheFiles on product.no = attacheFiles.common_fk and attacheFiles.tablename = 'product' and concat(attacheFiles.fileobject,attacheFiles.filename_index) = 'imagename1' where 1 = 1 AND categoryFk REGEXP("20210928s7jqc7if8c") AND filter REGEXP("t11") and product.viewYn in (1,3) ORDER BY registdate desc LIMIT 0, 20