ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 数据编辑方式 | 传入参 | 说明 | | --- | --- | | table | [ 必填 ] 表名 | | field | [ 必填 ] 字段数组 | | where | [ 必填 ] 判断语句数组 | | echo | [ 选填 ] 只输出语句( 1是 0否 ) | | 回调参 | 说明 | | --- | --- | | succeed | 执行状态(1成功 0失败) | | msg | 提示信息 | * 直接编辑 ~~~ $field = []; $field['字段名'] = '字段值'; $field['字段名'] = ['字段名-1']; $where = []; $where[] = '字段值="'.字段值.'"'; $back = $Sql -> edit($table,$field,$where); ~~~ * 只输出语句 ~~~ $field = []; $field['字段名'] = '字段值'; $field['字段名'] = ['字段名'+1]; $where = []; $where[] = '字段值="'.字段值.'"'; $back = $Sql -> edit($table,$field,$where,['echo'=>1]); ~~~ * 事务只输出语句 ~~~ $field = []; $field['字段名'] = '字段值'; $where = []; $where[] = '字段值="'.字段值.'"'; $step[] = $Sql -> edit($table,$field,$where,['echo'=>1]); ~~~ * 事务输出语句并强制数据变更 ~~~ $field = []; $field['字段名'] = '字段值'; $where = []; $where[] = '字段值="'.字段值.'"'; $step[] = [$Sql->edit($table,$field,$where,['echo'=>1]),'forced'=>1]; ~~~ | 修订时间 | 开发版本 | | --- | --- | | 2020-09-10 | 宝知林 - 服务端 |