DELETE f, fd, fo FROM `mn_zz_File` AS f LEFT JOIN mn_zz_FileData as fd on fd.id_file = f.id LEFT JOIN mn_zz_FileOpt as fo on fo.id_file = f.id WHERE f.`name` REGEXP '.*_[0-9]+x[0-9]+o?\\.[^\\.]+$';