New answers tagged

1

Not quite what you asked, but Search Kit is based on APIv4 and you can also do it directly with APIv4: $contacts = \Civi\Api4\Contact::get() ->addSelect('id') ->setJoin([ ['Participant AS participant', FALSE, NULL, ['participant.contact_id', '=', 'id'], ['participant.event_id', '=', '1']] ]) ->setGroupBy(['id']) ->addWhere('...


2

SELECT cc.id, cp.id FROM civicrm_contact cc LEFT JOIN civicrm_participant cp ON cc.id = cp.contact_id AND cp.event_id = 1 WHERE cp.id IS NULL; You can confirm that this works by running this straightforward query to see the contacts who ARE registered for an event: SELECT cc.id, cp.id FROM civicrm_contact cc LEFT JOIN civicrm_participant cp ON cc.id = cp....


Top 50 recent answers are included