CI框架里用pChart作报表数组不好识别

WBOY
发布: 2016-06-13 13:18:04
原创
909 人浏览过

CI框架里用pChart做报表数组不好识别
这是查询的代码
$array1[0]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='01'");
  $array1[1]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='02'");
  $array1[2]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='03'");
  $array1[3]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='04'");
  $array1[4]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='05'");
  $array1[5]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='06'");
  $array1[6]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='07'");
  $array1[7]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='08'");
  $array1[8]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='09'");
  $array1[9]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='10'");
  $array1[10]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='11'");
  $array1[11]= $this->db->query('select count(customer_id) '.$str2.' where bl_salesman_id='.$_POST["EmployeeId"]." and year(create_time)='2012' and month(create_time)='12'");
 

$result = array();


foreach ( $array1 as $v ) {
$result[] = $v->row_array();

}
   
  print_r($result);
exit();
$_SESSION =$v;



结果是:
Array
(
  [0] => Array
  (
  [count(customer_id)] => 4
  )

  [1] => Array
  (
  [count(customer_id)] => 1
  )

  [2] => Array
  (
  [count(customer_id)] => 1
  )

  [3] => Array
  (
  [count(customer_id)] => 2
  )

  [4] => Array
  (
  [count(customer_id)] => 2
  )

  [5] => Array
  (
  [count(customer_id)] => 1
  )

  [6] => Array
  (
  [count(customer_id)] => 1
  )

  [7] => Array
  (
  [count(customer_id)] => 3
  )

  [8] => Array
  (
  [count(customer_id)] => 2

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板