Re: [web2py] is there a function to increase a sql field
Thanks a lot. It works. On Sun, Mar 6, 2011 at 1:13 AM, Vasile Ermicioi wrote: > update tabl1 set field1=field1+1 where your_condition > db(some dal condtion like: db.table1.id>0).update(field1=db.table1.field1+1)
Re: [web2py] is there a function to increase a sql field
update tabl1 set field1=field1+1 where your_condition db(some dal condtion like: db.table1.id>0).update(field1=db.table1.field1+1)
[web2py] is there a function to increase a sql field
Hi, I want to know is there a function to add 1 to a sql field, or else I have to select to get the value of the field and then add 1 to the value, then update the field. Thanks.