On Dec 3, 7:39 pm, joe <[EMAIL PROTECTED]> wrote:
> i use this way in my code:
> db.update('tags','tag_id='+web.sqlquote(tagid),count=count+1),
> but it doesn't work.
> and i don't want to select the count first and then do a second
> db.update,
> is there any way to do it just like: update mytable set count=count+1
> in one db operation?
> thanks very much.

try this:

tagid='foo'
db.query('update tags set count=count+1', where='tag_id=$tagid,
vars=locals())
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to