On 12-Nov-07, at 11:37 AM, perol.chen_零下一度 wrote:
>
> I use code below update userinfo when user login:
>
> web.update('users',where="name=
> $name",vars=d,lastlogintime=nowtime,loginnum=web.SQLLiteral('loginnum
> +1'),lastloginip=web.ctx.ip)
>
> but i get an error:
> "Incorrect integer value: 'loginnum+1' for column 'loginnum' at row
> 1")
Probably there is a bug in web.py.
Use the following as work around.
web.query('UPDATE user WHERE name=$name lastlogintime=$nowtime,
loginnum=loginnum+1, lastloginip=web.ctx.ip, 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
-~----------~----~----~----~------~----~------~--~---