thinkphp自动给会员增加20积分代码怎么写,也可付费解决
thinkphp吧
全部回复
仅看楼主
level 2
mylove3344 楼主
会员表fx_users 积分字段pay_points
2017年01月07日 03点01分 1
level 6
tp里面自带有方法
2017年01月07日 14点01分 3
level 6
这直接拿出来+20再更新进去不就可以了?
2017年01月08日 10点01分 4
level 3
$User = M("users"); // 实例化User对象
$User->where('id=5')->setInc('pay_points',3); // 用户的积分
加3
2017年01月08日 16点01分 5
level 3
不知道你说的自动是主动 还是被动
主动 在服务器开启定时任务程序 定时执行
被动 写到 _initialize()就可以了
2017年01月08日 16点01分 6
level 9
楼上说的正确
2017年02月21日 16点02分 9
level 1

2017年02月21日 17点02分 11
1