ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
##### 读取多条数据 ~~~ $Sql->arr($table,$other); ~~~ ##### 参数说明 > $table [必选] 表名 > $other [可选] 可选参数 >1. field 读取字段值数组,空为读取所有字段 >2. where 判断语句数组 >3. group 分组语句 >4. order 排序语句 >5. limit 显示区间语句 >6. echo 打印语句[0:执行,1:打印] >7. double 键取值方式[0:字段名,1:字段名与数字] ##### 回调信息 > 数据数组 ##### 实例 - 读取多条数据 - 格式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); ~~~