select * from `JF3_files` as f where f.`dir` in ("20","21","22","23","30","29","26","27","28") and f.`id` not in ("") and f.`typ` = "image" and f.`public` = "1" order by f.`name`,f.`id`