Please explain! I don't understand - what does it do: db(db.product.id>10).update(product=db.product.price+20)
In updates You should normally specify what field or fields should be updated? db.define_table(‘product’, SQLField(‘price’,’double’), SQLField(‘discouted_price’,‘double’) On Jun 3, 2:47 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > no. it is correct as it is. > > On Jun 3, 7:41 am, notabene <niels...@gmail.com> wrote: > > > Page 84: > > Example: > > db(db.product.id>10).update(product=db.product.price+20) > > > Should be (????): > > db(db.product.id>10).update(db.product.price=db.product.price+20) > > > On Jun 3, 5:52 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > >http://www.web2py.com/examples/static/cookbook2.pdf --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---