select hd.type_id, hd.slug, c.community_name from tbl_homepage_description hd, tbl_community c where hd.status = '1' and hd.type_id=c.community_id_pk and hd.page_type='Community' and hd.site_id =3 Muslim Matrimony Community, Hanabali, Hanafi, Maliki, Shia, Sunni, Shafii, Uppara