On Thursday, June 28, 2018 at 10:34:47 AM UTC-4, Artem wrote: > > Dear Antony , > From your example : > query = ' OR '.join(str(db.product.id == i) for i in [list of ids]) > result type(query) is a string , could you tell me how to correctly > convert it to the pydal.objects.Query / Set ? > I'm trying query = db(query) , and get a pydal.objects.Set , but can't > use it , query.select() rise errors >
You need some way to tell the DAL what table is involved. So, either: db((db.product.id > 0) & query).select() or: db(query).select(db.product.ALL) Anthony > -- 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.

