多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
* 创建视图 | 传入参 | 说明 | | --- | --- | | 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的值定义判断字段名