Yep, this way it work:
  if request.vars.platform != 'ALL':
        platform_query = db.t_tests.f_test_platform == request.vars.platform
        graph_query = graph_query & (platform_query)
    if request.vars.project != 'ALL':
        project_query = db.t_tests.f_test_project == request.vars.project
        graph_query = graph_query & (project_query)
    if request.vars.device != 'ALL':
        device_query = db.t_tests.f_test_device == request.vars.device
        graph_query = graph_query & (device_query)
    if request.vars.milestone != 'ALL':
        milestone_query = db.t_tests.f_test_milestone == 
request.vars.milestone
        graph_query = graph_query & (milestone_query)
    if request.vars.env !='ALL':
        env_query = db.t_tests.f_tests_env == request.vars.env
        graph_query = graph_query & (env_query)

Many thanks.  :).

On Monday, February 24, 2014 4:51:31 PM UTC+2, Avi A wrote:
>
> Hi,
> I want to join t_a  and t_b:
> rows = db(db.t_a.created_by == auth.user.id).select(join=db.t_b.on(db.t_a.f_y 
> == db.t_b.id))
> that works,
> But  first I want to filter out t_b, for example: t_b to include only 
> records where f_x == 3.
> what I tried did not work, it just "ignored" it, nothing was filtered:
>
> t_b = db.t_b.f_x ==3
> rows = db(db.t_a.created_by == 
> auth.user.id).select(join=db.t_b.on(db.t_a.f_test 
> == db.t_b.id))
>
> So what is the way to do it?
> thanks.
>
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to