Question

I've created a Drupal View of our current members in CiviMember

SELECT civicrm_contact.organization_name AS civicrm_contact_organization_name,    civicrm_website.url AS civicrm_website_url
FROM 
{civicrm_membership} civicrm_membership
LEFT JOIN {civicrm_contact} civicrm_contact ON civicrm_membership.contact_id =  civicrm_contact.id
LEFT JOIN {civicrm_website} civicrm_website ON civicrm_contact.id = civicrm_website.contact_id
WHERE (( (civicrm_membership.status_id IN  ('4', '5', '6')) AND   (civicrm_contact.contact_type NOT IN  ('Individual', 'Household')) ))
ORDER BY civicrm_contact_organization_name ASC
LIMIT 50 OFFSET 0

But it keeps on returning duplicate results, sometimes 3 or 4 in a row and yet they're all single contact records with one current membership? Can anyone see where I've gone wrong?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top