Reply to Re: difficult query

Your name:

Reply:


Posted by Tarscher on 12/21/07 10:36

On 21 dec, 11:13, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> On 21 Dec, 08:43,Tarscher<tarsc...@gmail.com> wrote:
>
>
>
> > Hi all,
>
> > I have events containing attendees (events has many attendees). The
> > attendee table tells whether a user will attend the event or not. I
> > want to build a query that returns all the different events to a user
> > and if he will attend the event or not (or hasn't filled it in yet)
>
> > the returned result could be something like:
>
> > event.id attendees.user_id attendee.present
> > 1 1 0
> > 2 1
> > 3 1 1
>
> > Please note that attendee.present can be null if the user didn't yet
> > tell if he would come to the event.
>
> > Can this be done?
>
> > thanks
> > Stijn
>
> And this has what to do with php?
>
> You would be better to ask this in a database group.
>
> However some questions:
> If a user is querying the database to find if he will be attending the
> event, why does his own ID need to be present in the output?
> How does the attendee's id get into the table against an event in the
> first place?

I indeed don't need the user_id since it is stored in the session. It
was just to clarify that the query need to return 1 user.

Via the session the user_id stored in the session.

Regards

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация