On Tuesday, April 16, 2019 at 11:11:09 AM UTC-4, João Matos wrote:
>
> Is it possible to update a Rows object with another Rows object?
>
> I would like to do something similar to this (except that update does not 
> exist in Rows)
>
> rows = db(db.wo.id == int(request.args[0])).select()
> if len(request.args) > 1:
>     for id_ in request.args[1:]:
>         rows.update(db(db.wo.id == int(id_)).select()
>
>
Why not a single query to get all records:

rows = db(db.wo.id.belongs(request.args)).select()

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.

Reply via email to