FROM detail
LEFT OUTER JOIN contact ON detail.id_detail = contact.id_detail
LEFT OUTER JOIN contact_tel ON contact.id_con = contact_tel.id_con
LEFT OUTER JOIN fax ON detail.id_detail = fax.id_detail
LEFT OUTER JOIN tel ON detail.id_detail = tel.id_detail
WHERE detail.IsActive = 'T' AND detail.Enable = 'T' ";
FROM detail
LEFT OUTER JOIN contact ON detail.id_detail = contact.id_detail
LEFT OUTER JOIN contact_tel ON contact.id_con = contact_tel.id_con
LEFT OUTER JOIN fax ON detail.id_detail = fax.id_detail
LEFT OUTER JOIN tel ON detail.id_detail = tel.id_detail
WHERE detail.IsActive = 'T' AND detail.Enable = 'T'
GROUP BY ตาราง.ฟิว ";