select r.id resident_id,r.road,r.house,r.flat,r.status,r.created_at,m.id person_id,m.name,m.nid,m.mobile,m.profession,m.email,m.dob,m.facebook_id,m.blood_group,m.gender from resident_registration r left join resident_family_members m on r.id=m.resident_id  where r.inactive=0     order by r.id desc limit 0,100