- $uids = XDB::fetchColumn('SELECT uid
- FROM group_event_participants
- WHERE eid = {?} AND ' . $where[$suffix],
+ $uids = XDB::fetchColumn('SELECT g.uid
+ FROM group_event_participants AS g
+ INNER JOIN group_events AS e ON (g.eid = e.eid)
+ LEFT JOIN payment_transactions AS p ON (e.paiement_id = p.ref AND g.uid = p.uid)
+ WHERE g.eid = {?} AND ' . $where[$suffix],