|
Posted by Betikci Boris on 12/21/07 17:09
On Dec 21, 10:43 am, 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
There is no need to define events table, define attended events in
users table in arrays;
$events_attended=array("1","5","3"); and goes so on..
Navigation:
[Reply to this message]
|