From 2dc536ec7e67653c282badb936644566022f317a Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Sat, 13 May 2017 01:46:36 +0530 Subject: [PATCH] CRM-20567: backoffice membership via price set errors with non-aggregated column --- CRM/Price/BAO/PriceSet.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Price/BAO/PriceSet.php b/CRM/Price/BAO/PriceSet.php index 3b1dfb35d8..50189d2155 100644 --- a/CRM/Price/BAO/PriceSet.php +++ b/CRM/Price/BAO/PriceSet.php @@ -1341,11 +1341,11 @@ INNER JOIN civicrm_price_set pset ON ( pset.id = field.price_set_id ) */ public static function getMembershipCount($ids) { $queryString = " -SELECT count( pfv.id ) AS count, pfv.id AS id +SELECT count( pfv.id ) AS count, mt.member_of_contact_id AS id FROM civicrm_price_field_value pfv INNER JOIN civicrm_membership_type mt ON mt.id = pfv.membership_type_id WHERE pfv.id IN ( $ids ) -GROUP BY mt.member_of_contact_id"; +GROUP BY mt.member_of_contact_id "; $crmDAO = CRM_Core_DAO::executeQuery($queryString); $count = array(); -- 2.25.1