You can use belongs()

   db1.test.groupe.belongs(groupe) & ...



On Mon, Sep 28, 2015 at 4:36 PM, Laurent Lc <[email protected]> wrote:

> function in controller
>
> def showselectionfunding():
>     groupe = request.vars['groupe']
>     ask_date = request.vars['ask_date']
>     query=((db1.test.groupe == groupe)&(db1.test.datefincontrat >
> ask_date))
>     #query=((db1.test.groupe == groupe)&(db1.test.financement==
> financement)&(db1.test.datefincontrat > ask_date))
>     grid = SQLFORM.grid(query=query,user_signature=False, maxtextlength =
> 40, \
>
> fields=[db1.test.nom,db1.test.mail,db1.test.datefincontrat],orderby=db1.test.datefincontrat)
>     return dict(grid=grid)
>
> imagine now that the var "groupe is a list". the best way to return the
> result ?
> Than you
>
> --
> 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/d/optout.
>



-- 
Massimiliano

-- 
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/d/optout.

Reply via email to