ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
* 添加数据 | 传入参 | 说明 | | --- | --- | | table | [ 必填 ] 表名 | | field | [ 必填 ] 字段数组 | | other | [ 选填 ] 设置数组 | | - echo | [ 选填 ] 只输出语句( 1是 0否 ) | | 回调参 | 说明 | | --- | --- | | succeed | 执行状态(1成功 0失败) | | msg | 提示信息 | | type | 语句类型 | | yuju | 输出语句 | | [ sql ] | echo启用时直接输出语句 | * 直接添加 ~~~ $field = []; $field['字段名'] = '字段值'; $back = $D_P->add($table,$field); ~~~ >{"succeed":1,"type":"add","msg":"执行成功[D_P194]"} * 只输出语句 ~~~ $field = []; $field['字段名'] = '字段值'; $field['字段名'] = ['字段名']; $back = $D_P->add($table,$field,['echo'=>1]); ~~~ >INSERT INTO `sbh_table`(`name`) VALUES ('7042') * 事务只输出语句 ~~~ $field = []; $field['字段名'] = '字段值'; $step[] = $D_P->add($table,$field,['echo'=>1]); ~~~ >INSERT INTO `sbh_table`(`name`) VALUES ('7042')