rows = db(yourquery).select(mytable.id, mytable.myfield)
form = SQLFORM.factory(*[Field('name_%s'%r.id, default=r.myfield) for
r in rows])
if form.process().accepted:
    for key,value in form.vars.items():
        db(mytable.id==key[5:]).update(myfield = value)

form.process().accepted is the same as form.accepted(request,session)
but shorter.

On Sep 10, 2:55 pm, Serbitar <[email protected]> wrote:
> is there any way to update multiple records with crud.update, or even
> records with a given query?

Reply via email to