##更新数据 使用 update 方法向数据库更新数据 ``` mysql('table').where('user_id',1).update({'user_id':2}) ``` 最终生成的SQL语句是: ``` UPDATE table SET user_id = '2' WHERE user_id = '1' ``` update 方法更新成功后返回1,失败后返回0 ##字端增减 使用 setinc 方法数据库字端 (该字段是数字的情况下) ``` mysql('table').where('id',1).setinc({'balance':2}) ``` 使用 setinc 方法数据库字端 (该字段是数字的情况下) ``` mysql('table').where('id',1).setinc({'balance':-2}) ``` 以上方法分别对table表的balance字段进行加2和减2

kcweb官方开发手册

开发版 6.4.28 6.4.21 6.4.17 6.4.15 6.4.9 6.4.8 6.4.4 6.2 6.1 5.330 5.328
登录

 {{data.name}}

登录
确认设置密码