Thread: query problem
View Single Post

   
  #6 (permalink)  
Old 05-05-2008, 05:51 AM
Tarscher
 
Posts: n/a
Default Re: query problem

On May 3, 12:29*pm, Erick T. Barkhuis <erick.use-...@ardane.c-o-m>
wrote:
> Tarscher:
>
>
>
> > On May 3, 10:57*am, Luuk <L...@invalid.lan> wrote:
> > > Tarscher schreef:

>
> > > > Hi all,

>
> > > > I have a users table and every user has many registrations - Also a
> > > > registration has 1 event.

>
> > > > I want to get all the users of which I have the id and their
> > > > registration for an event. I also want to have the user when she
> > > > doesn't has registered for that event.

>
> > > > I have a hard time solving this query.

>
> > > > regards,
> > > > Stijn

>
> > > start reading here:http://dev.mysql.com/doc/refman/5.0/en/join.html

> > Erick:

>
> You're replying to Luuk. Please, note where you are in the thread.
>
> > indeed I want the user regardless of his relationship with
> > registrations

>
> Then why not get the user?: select * from users where uid in (1,2,3);
> What exactly are you doing with those reservations and events, if the
> relationship to them is not relevant for this query?
>
> --
> Erick


Something like
user 1 : attends
user 2 : does not attend
user 3: not yet registered

I want to show the users with the ids (here 1,2,3) and whether they
will attend the event or not. If the user hasn't got a registration
for that event then she is considered not registered for that event.
That's why I need to know if there is a registration for that user and
event.

Regards,
Stijn

In some cases there is no registration for a user for a certain event.
Reply With Quote