difficult query

Hi all,

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 ofcourse

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?

Thanks, Stijn

You are right. That is much better.

1 question thuogh: maybe attendee is not a good name because calling it attendee and also using it for not attending the event is a bit weird I think.

I'm looking for a suitable word but my English fails me. Maybe you have a suggestion?

Thanks Stijn