This is the shortcut

db(db.mytab.id==mytab_id).update(cnt=db.mytab.cnt+1)


because it does it in one SQL statement

Other ways, when they work, are equivalent to

row = db.mytab(mytab_id)
row.update_record(cnt=row.nct+1)

ie.e. two statements.

On Jul 1, 7:59 pm, weheh <[email protected]> wrote:
> Thanks, that works now. My head is fuzzy today after all I've been
> through. I had tried this:
>
>     db.mytab[mytab_id]=dict(cnt=db.mytab.cnt+1)
>
> but that didn't work. Is there a "shortcut" syntax to do this? Just
> curious, as the "longcut" is clearly just as short.

Reply via email to