On Monday, August 12, 2013 4:37:08 AM UTC-4, sasogeek wrote:

> how do i explicitly update the auth.user.money?
> I thought that's what I did here "...{'money':auth.user.money+100}..."
>

No, your code updates the db.auth_user record *in the database*. auth.user 
is just an attribute of the auth object (it gets stored in the session and 
retrieved from there on every request). To update it, you would do 
something like:

auth.user.update(money=auth.user.money + 100)

or:

auth.user.money = auth.user.money + 100

or more simply:

auth.user.money += 100

Anthony

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to