PChart is not easy to identify as a report array in the CI framework.

Source: Internet
Author: User
In the CI framework, pChart is used as a report array, which is difficult to identify. this is the query code $ array1 [0] = $ this-& gt; db-& gt; query ('selectcount (customer_id )'. $ str2. 'wherebl _ salesman_id = '. $ _ POST [the pChart is not easy to recognize in the & quo CI framework for report arrays
This is the query code.
$ Array1 [0] = $ this-> db-> query ('SELECT count (customer_id )'. $ str2. 'Where bl_salesman_id = '. $ _ POST ["EmployeeId"]. "and year (create_time) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' 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) = '20140901' and month (create_time) = '12 '");


$ Result = array ();


Foreach ($ array1 as $ v ){
$ Result [] = $ v-> row_array ();

}

Print_r ($ result );
Exit ();
$ _ SESSION = $ v;



The result is:
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.