主要还是看手册
tp5手册更新
Db::name('user')
->where('id',2) // 条件
->inc('age') // 增加的字段 默认1
->dec('grade') // 减少的字段 默认1 ->dec('grade',5) 减少 5
->update(['update_time'=>time()]); // 更新字段
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!