thank you for your suggestion anthony, i've already tested it, both db(
db.product.id==key).update(quantity=db.product.quantity - value)
and db(db.product.id==key).update(quantity=db.product(key).quantity -
value) is work well during update the quantity in product table.
db(db.product.id==key).update(quantity=db.product.quantity -
>> value)
>
>
> Here you probably want:
>
> db(db.product.id==key).update(quantity=db.product(key).quantity -value
> )
>
> db.product.quantity is a Field object, but you want to get the value of
> that field for the particular record, which is db.product(key).quantity.
>
--
---
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].
For more options, visit https://groups.google.com/groups/opt_out.