I'm trying to fetch all people without a registration for a specific event.
My models are Person, Event and Registration.
In the MySQL table it would add an entry to the registrations table with the person.id
and event.id
(plus comment and a "status" - 1 for registration, 2 for deregistration).
Now, I'm trying to get all people which did no action, all registrations and all deregistrations (in that order). How can I do that?
edit: may I add some more information:
Structure in database:
people: id, name, mail ...
events: id, title, date ...
registrations: id, person_id, event_id, status ...
Problem:
It's easy to select all registrations and deregistrations. But I've also to select all people which did no action for an event.
One way I thought about is to select all people from the people model. Then select all registrations from the specific event, and finally compare the two arrays. What do you think?