💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
* 编辑数据 | 传入参 | 说明 | | --- | --- | | table | [ 必填 ] 表名 | | field | [ 必填 ] 字段更新数组 | | where | [ 选填 ] 判断语句数组 | | other | [ 选填 ] 设置数组 | | - echo | [ 选填 ] 只输出语句( 1是 0否 ) | | - forced | [ 选填 ] 强制所有数据变更( 1是 0否 ) | | - limit | [ 选填 ] 限制更新条数 , 如 : 1 | | 回调参 | 说明 | | --- | --- | | succeed | 执行状态(1成功 0失败) | | msg | 提示信息 | | type | 语句类型 | | yuju | 输出语句 | | [ sql ] | echo启用时直接输出语句 | * 直接编辑 ~~~ $field = []; $field['字段名'] = '字段值'; $field['字段名'] = ['字段名-1']; $where = []; $where[] = '字段值="'.字段值.'"'; $back = $D_P->edit($table,$field,$where); ~~~ * 只输出语句 ~~~ $field = []; $field['字段名'] = '字段值'; $field['字段名'] = ['字段名'+1]; $where = []; $where[] = '字段值="'.字段值.'"'; $back = $D_P->edit($table,$field,$where,['echo'=>1]); ~~~ * 事务只输出语句 ~~~ $field = []; $field['字段名'] = '字段值'; $where = []; $where[] = '字段值="'.字段值.'"'; $step[] = $D_P->edit($table,$field,$where,['echo'=>1]); ~~~ * 事务输出语句并强制数据变更 ~~~ $field = []; $field['字段名'] = '字段值'; $where = []; $where[] = '字段值="'.字段值.'"'; $step[] = [$D_P->edit($table,$field,$where,['echo'=>1]),'forced'=>1]; ~~~