ホームページ  >  記事  >  バックエンド開発  >  CI フレームワークで pChart を使用してレポート配列を識別するのは困難です

CI フレームワークで pChart を使用してレポート配列を識別するのは困難です

WBOY
WBOYオリジナル
2016-06-13 13:18:04903ブラウズ

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"]." および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;



結果:
配列
(
[0] =>配列
(
[count(customer_id)] => 4
)

[1] =>配列
(
[count(customer_id)] => 1
)

[2] =>配列
(
[count(customer_id)] => 1
)

[3] =>配列
(
[count(customer_id)] => 2
)

[4] =>配列
(
[count(customer_id)] => 2
)

[5] =>配列
(
[count(customer_id)] => 1
)

[6] => 1
)配列
(
[count(customer_id)] => 1
)

[7] =>配列
(
[count(customer_id)] => 3
)

[8] =>配列
(

[count(customer_id)] => 2
声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。