Questa Query ha dato errore :
"SELECT (SELECT value FROM immobiliareit_values iiv WHERE iiv.value_type = 'CondizioniImmobile' AND iiv.value_id = e.CondizioniImmobile AND iiv.valid_for = 'Residenziale') as CondizioniImmobileNome, e.*, (SELECT GROUP_CONCAT(formats ORDER BY sort_order SEPARATOR '*') FROM files f LEFT JOIN estate_photos ep USING(file_id) WHERE ep.estate_id = e.estate_id) as photos, (SELECT COUNT(*) FROM files f LEFT JOIN estate_photos ep USING(file_id) WHERE ep.estate_id = e.estate_id) as count_photos, (SELECT NomeTipologia FROM immobiliareit_categoria ic WHERE ic.IDTipologia = e.IDTipologia GROUP BY IDTipologia) as NomeTipologia, (SELECT CONCAT(agency_name,'####',agency_phone,'####',agency_fax,'####',agency_email) FROM agency a WHERE a.agency_id = e.agency_id ) as agency_data, (SELECT CASE e.area_type WHEN 'location' THEN (SELECT NomeLocalita FROM immobiliareit_localita il WHERE il.location_id = e.area_id) WHEN 'block' THEN (SELECT NomeQuartiere FROM immobiliareit_quartiere iq WHERE iq.block_id = e.area_id) END) AS area_name, (SELECT ii.nome_comune FROM immobiliareit_istat_2010 ii WHERE ii.ISTAT = e.ISTAT) as nome_comune, (SELECT value FROM immobiliareit_values iv WHERE iv.value_type = "ClasseEnergetica" AND iv.value_id = e.ClasseEnergetica) as ClasseEnergeticaNome, (SELECT value FROM immobiliareit_values iv WHERE iv.value_type = "Riscaldamento" AND iv.value_id = e.Riscaldamento LIMIT 1) as NomeRiscaldamento, (SELECT GROUP_CONCAT(CONCAT(lang,'****',txt_type,'****',value) SEPARATOR '----') FROM estate_txt et WHERE et.estate_id = e.estate_id GROUP BY et.estate_id) estate_txt, (SELECT value FROM estate_binary_fields ebf WHERE ebf.estate_id = e.estate_id AND ebf.field_id = 15) as binary_field_15, (SELECT quantity FROM estate_rooms er WHERE er.estate_id = e.estate_id AND er.room_type_id = 25 LIMIT 1) as count_room_25, (SELECT quantity FROM estate_rooms er WHERE er.estate_id = e.estate_id AND er.room_type_id = 21 LIMIT 1) as count_room_21, (SELECT quantity FROM estate_rooms er WHERE er.estate_id = e.estate_id AND er.room_type_id = 16 LIMIT 1) as count_room_16, (SELECT quantity FROM estate_rooms er WHERE er.estate_id = e.estate_id AND er.room_type_id = 15 LIMIT 1) as count_room_15, (SELECT quantity FROM estate_rooms er WHERE er.estate_id = e.estate_id AND er.room_type_id = 10 LIMIT 1) as count_room_10 FROM estate e LEFT OUTER JOIN estate_portal ep ON e.estate_id = ep.estate_id INNER JOIN portal_agency pa ON e.agency_id = pa.agency_id WHERE (e.status = 0) AND (ep.portal_id = 5 OR ep.portal_id IS NULL) AND (pa.portal_id = 5) AND (ep.estate_portal_status = 1 OR ep.estate_portal_status = 0 OR ep.estate_portal_status IS NULL) AND e.estate_id=60480"

Out of resources when opening file './iiweb_test/estate_photos.MYD' (Errcode: 24 - Too many open files)