<?php
     public function export_do_one(){  //excel 导出数据
         import('ORG.Util.Page_new');// 导入分页类 ,修改了原来的Page分页类
         $order_sms_reply=M('order_sms_reply');
         $order_sms=M('order_sms');
         $data=null;
         $data[;
         $data['B.type']='xiaofeizhe_pingjia';
         $total_count = M('order_sms_reply')->alias("A")->join('z_order_sms as  B on  A.mobi=B.mobi')->where($data)->count();// 查询满足要求的总记录数
         $Page = );// 实例化分页类 传入总记录数和每页显示的记录数
         //$show = $Page->show();// 分页显示输出
         //$rs=M('order_sms_reply')->alias("A")->join('z_order_sms as  B on  A.mobi=B.mobi')->where($data)->limit($Page->firstRow.','.$Page->listRows)->field('A.mobi,A.content,B.remark')->select();
         $this->assign('page',$show);// 赋值分页输出
         $totalPages=$Page->totalPages;  //得到总的页面数量
         ;$i<=;$i++){
             $page_start=$i*-;
             $rs=M()->field('A.mobi,A.content,B.remark')->select();
             $rs_total[]=$rs;
         }
         if($rs_total){
             return $rs_total;
         }
     }

     public function  export_one(){
         $order_list=$this->export_do_one();
         foreach($order_list as $k=>$v){
             foreach($v as $k2=>$v2){
                 $v3[]=$v2;
             }
         }
         //dump($v3);die;
         $v3=array();
         //phpinfo();die;
 //      foreach($v3 as $k3=>$v3){
 //          $v4[]=$v3;
 //      }
 //      $strlen_arr=count($v4);
 //      for($j=0;$j<=$strlen_arr;$j++){
 //
 //      }
          R("Excel/excel_export",
             array(
                 $v3,           //数组
                 '消费者回复1的',
                 '消费者回复2的'
             )
         );
     }
 ?>
05-11 18:10