💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 单条数据获取方式 | 传入参 | 说明 | | --- | --- | | table | \[ 必填 \] 表名 | | other | \[ 选填 \] 配置参数数组 | | \- field | 指定获取字段名数组,特殊用法加\[\]改成数组 如 : \[count(\*) as total\] | | \- where | 判断语句数组 | | \- order | 排序语句 , 如 : "abc desc" | | \- group | 分组语句 , 如 : "abc" | | echo | \[ 选填 \] 只输出语句( 1是 0否 ) | | 回调参 | 说明 | | --- | --- | | \[num\] | 数据数组键名 | | \- \[field\] | 单条数组键名 | * 读取单条数据 - 格式1 ~~~ $other = []; $other['where'] = ['字段名="'.搜索变量值.'"']; $row = $Sql->row($table,$other); ~~~ * 读取单条数据 - 格式2 ~~~ $other = []; $other['field'] = ['搜索字段名1','搜索字段名2']; $other['where'] = ['字段名="'.搜索变量值.'"']; $row = $Sql->row($table,$other); ~~~ * 读取单条数据 - 格式3 ~~~ $other = []; $field = []; $field[] = '搜索字段名1'; $field[] = '搜索字段名2'; $other['field'] = $field; $other['where'] = ['字段名="'.搜索变量值.'"']; $row = $Sql->row($table,$other); ~~~ * 读取单条数据 - 格式4 ~~~ $other = []; $other['field'] = ['搜索字段名1','搜索字段名2']; $where = []; $where[] = '字段名="'.搜索变量值.'"'; $other['where'] = $where; $row = $Sql->row($table,$other); ~~~ * 读取单条数据 - 格式5 ~~~ $other = []; $field = []; $field[] = '搜索字段名1'; $field[] = '搜索字段名2'; $other['field'] = $field; $where = []; $where[] = '字段名="'.搜索变量值.'"'; $other['where'] = $where; $row = $Sql->row($table,$other); ~~~ | 修订时间 | 开发版本 | | --- | --- | | 2020-09-12 | 宝知林 - 服务端 |