Hello all,
I am wondering if it's possible to use DAL update method to increment the
value of table column H_REVNO in one line of code, and one trip to the
database?
I tried this query, and a couple of similar variations, but could not get
it to work.
db(db.KICKER.id == request.vars.kicker_id).update(H_REVNO=H_REVNO+1)
Here is what I am using for now
db.executesql("update KICKER set H_REVNO = H_REVNO + 1 where ID = "+
str(request.vars.kicker_id)) which of course works.
Thank you all!
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/c2caa621-3d33-4fc9-9831-9756833444d6n%40googlegroups.com.