企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
* 多条数据获取方式 | 传入参 | 说明 | | --- | --- | | table | [ 必填 ] 表名 | | other | [ 选填 ] 设置数组 | | - field | [ 选填 ] 指定获取字段名数组,特殊用法加\[\]改成数组<br>如 : [count(*) as total] | | - jointable | [ 选填 ] 两表左联接查询右表名称,必须与on同时填写<br>如 user as u (u为user表的别称)| | - on | [ 选填 ] 两表左联接查询条件,必须与jointable同时填写<br>如:u.u_id=w.u_id(u和w为两表的别称) | | - where | [ 选填 ] 判断语句数组 | | - group | [ 选填 ] 分组语句 , 如 : "abc" | | - order | [ 选填 ] 排序语句 , 如 : "abc desc" | | - having | [ 选填 ] 根据group结果进行二次筛选 | | - limit | [ 选填 ] 显示区间语句 , 如 : "0,1" | | - double | [ 选填 ] 双数据模式 (1开启 0关闭) | | - echo | [ 选填 ] 只输出语句( 1是 0否 ) | | 回调参 | 说明 | | --- | --- | | succeed | 执行状态(1成功 0失败) | | msg | 提示信息 | | [ arr ] | 数据数组键名 | | [ sql ] | Sql语句 | * 读取多条数据 - 格式1 ~~~ $other = []; $other['where'] = ['字段名="'.搜索变量值.'"']; $arr = $D_P->arr($table,$other); ~~~ * 读取多条数据 - 格式2 ~~~ $other = []; $other['field'] = ['搜索字段名1','搜索字段名2']; $other['where'] = ['字段名="'.搜索变量值.'"']; $arr = $D_P->arr($table,$other); ~~~ * 读取多条数据 - 格式3 ~~~ $other = []; $field = []; $field[] = '搜索字段名1'; $field[] = '搜索字段名2'; $other['field'] = $field; $other['where'] = ['字段名="'.搜索变量值.'"']; $arr = $D_P->arr($table,$other); ~~~ * 读取多条数据 - 格式4 ~~~ $other = []; $other['field'] = ['搜索字段名1','搜索字段名2']; $where = []; $where[] = '字段名="'.搜索变量值.'"'; $other['where'] = $where; $arr = $D_P->arr($table,$other); ~~~ * 读取多条数据 - 格式5 ~~~ $other = []; $field = []; $field[] = '搜索字段名1'; $field[] = '搜索字段名2'; $other['field'] = $field; $where = []; $where[] = '字段名="'.搜索变量值.'"'; $other['where'] = $where; $arr = $D_P->arr($table,$other); ~~~ * 读取多条数据 - 格式6 ~~~ $other = []; $field = []; $field[] = '搜索字段名1'; $field[] = '搜索字段名2'; $other['field'] = $field; $other['jointable'] = '表名 as 别称'; $other['on'] = '两表联接查询条件'; $where = []; $where[] = '字段名="'.搜索变量值.'"'; $other['where'] = $where; $arr = $D_P->arr('表名 as 别称',$other); ~~~