I’m having problems creating a query.
I have an event that has many attendees
events_table: id, name
attendees_table: id, user_id, event_id, present
I want to create a query that shows all the events to a user and if he
will be present (the user can add/change his presens). If he hasn’t
yet added his presense than there is no record in the attendees table
An example of a queryresult can look like:
events.id | attendees.user_id | attendees.present
1 2 1 <–
will be present at event 1
2 2 null <–
has not yet stated his presense at event 2
3 2 0 <–
will not be present at event 3
Someone has an idea?