1 2 3 4 5 6 7 8 9 10 11 12
| $query_client = "SELECT t1.count_adw, t2.count_r, t3.count_aff, t4.count_tt FROM (SELECT COUNT(customers_id) AS count_adw FROM customers WHERE (customers_client='1' or customers_emv='1' or customers_seance ='1' or customers_emv='1' )and customers_from='adwords' ) t1,
(SELECT COUNT(customers_id) AS count_r FROM customers WHERE (customers_client='1' or customers_emv='1' or customers_seance ='1' or customers_emv='1' )and customers_from='' ) t2,
(SELECT COUNT(customers_id) AS count_aff FROM customers WHERE (customers_client='1' or customers_emv='1' or customers_seance ='1' or customers_emv='1' )and customers_from!='adwords' and customers_from!='' ) t3,
(SELECT COUNT(customers_id) AS count_tt FROM customers WHERE (customers_client='1' or customers_emv='1' or customers_seance ='1' or customers_emv='1' ) ) t4 ";
$result = mysql_query($query_client);
$query_vg = "SELECT vg1.count_adw, vg2.count_r, vg3.count_aff, vg4.count_tt FROM (SELECT COUNT(customers_id) AS count_adw FROM customers WHERE customers_client='0' and customers_emv='0' and customers_seance ='0' and customers_emv='0' and customers_from='adwords' ) vg1,
(SELECT COUNT(customers_id) AS count_r FROM customers WHERE customers_client='0' and customers_emv='0' and customers_seance ='0' and customers_emv='0' and customers_from='' ) vg2,
(SELECT COUNT(customers_id) AS count_aff FROM customers WHERE customers_client='0' and customers_emv='0' and customers_seance ='0' and customers_emv='0' and customers_from!='adwords' and customers_from!='' ) vg3,
(SELECT COUNT(customers_id) AS count_tt FROM customers WHERE customers_client='0' and customers_emv='0' and customers_seance ='0' and customers_emv='0' ) vg4 ";
$result_vg = mysql_query($query_vg); |