SELECT * FROM lh_prod_size_assoc assoc INNER JOIN lh_prod_size ps ON ps.s_id=assoc.s_id INNER JOIN lh_prod_img pi ON pi.s_id=assoc.s_id WHERE assoc.prod_id = '58' GROUP BY assoc.s_id