Thank you Leonel for this solution that works perfectly.

I've to study more the complex queries.

Il giorno mercoledì 15 febbraio 2017 00:39:16 UTC+1, Leonel Câmara ha 
scritto:
>
> One way to do it would be to use *belongs*
>
> user_event_ids = db(db.events_users.created_by == auth.user.id)._select(db
> .events_users.going_event)
> going_events = db((db.events.event_datetime >= request.now) & db.events.id
> .belongs(user_event_ids)).select()
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to