SELECT *
FROM (
SELECT *
FROM `tbl_1`
WHERE (deleted="no" AND `where`="arh") AND (`type`="Cloth" )
) AS `t1`
LEFT JOIN `tbl_2` ON `tbl_2`.`id_fp` = `t1`.`foto_id` AND `tbl_2`.`sklad` = 'Склад'
LEFT JOIN `tbl_3` ON `tbl_3`.`id_fp` = `t1`.`foto_id` AND `tbl_3`.`to_res_id` = '+resId+' ';