ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 多条数据获取方式 | 传入参 | 说明 | | --- | --- | | table | \[ 必填 \] 表名 | | other | \[ 选填 \] 配置参数数组 | | \- field | 指定获取字段名数组,特殊用法加\[\]改成数组 如 : \[count(\*) as total\] | | \- where | 判断语句数组 | | \- order | 排序语句 , 如 : "abc desc" | | \- limit | 分页语句 , 如 : "0,10" | | \- group | 分组语句 , 如 : "abc" | | echo | \[ 选填 \] 只输出语句( 1是 0否 ) | | 回调参 | 说明 | | --- | --- | | \[num\] | 数据数组键名 | | \- \[field\] | 单条数组键名 | * 读取多条数据 - 格式1 ~~~ $other = []; $other['where'] = ['字段名="'.搜索变量值.'"']; $arr = $Sql->arr($table,$other); ~~~ * 读取多条数据 - 格式2 ~~~ $other = []; $other['field'] = ['搜索字段名1','搜索字段名2']; $other['where'] = ['字段名="'.搜索变量值.'"']; $arr = $Sql->arr($table,$other); ~~~ * 读取多条数据 - 格式3 ~~~ $other = []; $field = []; $field[] = '搜索字段名1'; $field[] = '搜索字段名2'; $other['field'] = $field; $other['where'] = ['字段名="'.搜索变量值.'"']; $arr = $Sql->arr($table,$other); ~~~ * 读取多条数据 - 格式4 ~~~ $other = []; $other['field'] = ['搜索字段名1','搜索字段名2']; $where = []; $where[] = '字段名="'.搜索变量值.'"'; $other['where'] = $where; $arr = $Sql->arr($table,$other); ~~~ * 读取多条数据 - 格式5 ~~~ $other = []; $field = []; $field[] = '搜索字段名1'; $field[] = '搜索字段名2'; $other['field'] = $field; $where = []; $where[] = '字段名="'.搜索变量值.'"'; $other['where'] = $where; $arr = $Sql->arr($table,$other); ~~~ | 修订时间 | 开发版本 | | --- | --- | | 2020-09-10 | 宝知林 - 服务端 |