🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 直接编辑 > table : 表名 > field : 字段数组 > where : 判断语句数组 ~~~ $field = []; $field['字段名'] = '字段值'; $where = []; $where[] = '字段值="'.字段值.'"'; $back = $Sql -> edit($table,$field,$where); ~~~ ***** # 只输出语句 > table : 表名 > field : 字段数组 > where : 判断语句数组 ~~~ $field = []; $field['字段名'] = '字段值'; $field['字段名'] = ['字段名'+1]; $where = []; $where[] = '字段值="'.字段值.'"'; $back = $Sql -> edit($table,$field,$where,['echo'=>1]); ~~~ ***** # 事务只输出语句 > table : 表名 > field : 字段数组 > where : 判断语句数组 ~~~ $field = []; $field['字段名'] = '字段值'; $where = []; $where[] = '字段值="'.字段值.'"'; $step[] = $Sql -> edit($table,$field,$where,['echo'=>1]); ~~~ ***** # 事务输出语句并强制数据变更 > table : 表名 > field : 字段数组 > where : 判断语句数组 ~~~ $field = []; $field['字段名'] = '字段值'; $where = []; $where[] = '字段值="'.字段值.'"'; $step[] = [$Sql->edit($table,$field,$where,['echo'=>1]),'forced'=>1]; ~~~ *****