合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
* 创建视图 | 传入参 | 说明 | | --- | --- | | name | [ 必填 ] 视图名称 | | arr | [ 必填 ] 对应字段数组 ( 原字段 => 视图字段 ) | | opt | [ 必填 ] 处理方式 ( 1 union all ) | | other | [ 选填 ] 设置数组 | | - echo | [ 选填 ] 只输出语句( 1是 0否 ) | | 回调参 | 说明 | | --- | --- | | succeed | 执行状态(1成功 0失败) | | msg | 提示信息 | | yuju | 输出语句 | | [ sql ] | echo启用时直接输出语句 | * 合并视图案例 ( union all ) ~~~ $field = []; $obj = []; $obj['sm_id'] = 'sm_id'; $obj['account'] = 'account'; $field['sbh_manage'] = $obj; $obj = []; $obj['u_id'] = 'u_id'; $obj['account'] = 'account'; $field['user'] = $obj; $back = $D_P->view("view_name",$field,1); $back = $D_P->view("view_name",$field,1,['echo'=>1]); ~~~ * 关联视图案例 ( LEFT JOIN ) ~~~ $field = []; $obj = []; $obj['id'] = 'id'; $obj['field1'] = 'field1'; $field['table1'] = [$obj,'id']; $obj = []; $obj['field2'] = 'field2'; $field['upload_program_record'] = [$obj,'id']; $back = $D_P->view("view_name",$field,2); $back = $D_P->view("view_name",$field,2,['echo'=>1]); ~~~ > 注 :字段名称不能重复,可用每组1的值定义判断字段名