query($Query); $nsssss=mysql_num_rows($namesss); $manssss='0'; $si=0; while ($rowsss = mysql_fetch_array($namesss)) { echo $orderid=$rowsss['orderid']; ?>
query($Query_1); $row_1 = mysql_fetch_array($name_1); echo $user_id=$row_1['userid']; exit(); } exit(); ?>

Reports

Success! Data Edited Sucessfully.
='".$date_paid1."' and DATE(orderdate) <='".$date_paid12."' "; } if($_REQUEST['from']!="" && $_REQUEST['to']=="" ) { $cond9.="and DATE(order_date_time) ='".$date_paid1."'"; } if($_REQUEST['from']!="" && $_REQUEST['to']=="" ) { $cond9.="and DATE(order_date_time) ='".$date_paid12."'"; } if($_REQUEST['from']!="" && $_REQUEST['to']!="" ) { $cond9.="and DATE(order_date_time) >='".$date_paid1."' and DATE(order_date_time) <='".$date_paid12."' "; } $table_name="shop_product"; $sort=$_REQUEST['sort']; /*where company_name='Energy Foods'*/ if($sort==1) { $Query = "SELECT a.product_id,a.vstatus,a.product_url,a.name,(SELECT sum(qty) as newqtyy from `tbl_order` where productid=a.product_id and orderid IN(SELECT orderid from tbl_confirmorder where company_name='Energy Foods ' $cond9) ) as v from shop_product as a order by v desc "; } if($sort==2) { $Query = "SELECT a.product_id,a.vstatus,a.product_url,a.name,(SELECT sum(qty) as newqtyy from `tbl_order` where productid=a.product_id and orderid IN(SELECT orderid from tbl_confirmorder where company_name='Energy Foods ' $cond9) ) as v from shop_product as a order by v asc "; } if($sort=="") { $Query = "SELECT * from shop_product $cond12 order by name asc"; } $namesss=$DB->query($Query); $nsssss=mysql_num_rows($namesss); $manssss='0'; $new_price_1=0; $si=0; while ($rowsss = mysql_fetch_array($namesss)) { $product_id=$rowsss['product_id']; $vstatus=$rowsss['vstatus']; $com_name=$rowsss['vstatus']; $Query_v_status = "SELECT * from tbl_company where id='$vstatus' "; $name_v_status=$DB->query($Query_v_status); $row_v_status = mysql_fetch_array($name_v_status); //$status=$rowsss['status']; //$cat_id=$rowsss['manufacturer_id']; //SELECT sum(qty) as newqtyy from `tbl_order` where productid='$product_id' $cond9 $no_1=0; $no=0; $new_price_0=0; // echo $my_Query = " // (SELECT * from `tbl_order` where totprice!=0 and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and refid not like '%CO%' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id IN( SELECT user_id from shop_user where new_status='0') union all // SELECT * from `tbl_order` where totprice!=0 and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and refid not like '%CO%' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id =0 )"; $Query = " SELECT SUM(t.qty) AS newqtyy, SUM(t.totprice) AS paraprice FROM(SELECT qty, totprice from `tbl_order` where totprice!=0 and productid='$product_id' and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and refid not like '%CO%' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id IN( SELECT user_id from shop_user where new_status='0') union all SELECT qty, totprice from `tbl_order` where totprice!=0 and productid='$product_id' and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and refid not like '%CO%' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id =0 )t"; $name=$DB->query($Query); $no=mysql_num_rows($name); $row = mysql_fetch_array($name); $new_price_0=$row['paraprice']; $new_price_1 +=$new_price_0; // echo $new_price_0 .' '. $new_price_1.'
'; // echo $new_price_1.'
'; $nn_ssss=""; $Query_1 = "SELECT sum(qty) as newqtyy from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where company_name='Energy Foods' $cond9) and user_id IN( SELECT user_id from shop_user where new_status='1') "; // $Query_1 = " SELECT SUM(t.qty) AS newqtyy, SUM(t.totprice) AS paraprice // FROM(SELECT qty, totprice from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and company_name='Energy Foods' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id IN( SELECT user_id from shop_user where new_status='1') $cond9 union all // SELECT qty, totprice from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and company_name='Energy Foods' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id =0 $cond9 )t"; $name_1=$DB->query($Query_1); $no_1=mysql_num_rows($name_1); $row_1 = mysql_fetch_array($name_1); $Query_2 = "SELECT sum(freeqty) as newqtyy from `tbl_order` where productid='$product_id' and orderid IN(SELECT orderid from tbl_confirmorder where company_name='Energy Foods' $cond9) and user_id IN( SELECT user_id from shop_user where new_status='1') "; // $Query_2 = " SELECT SUM(t.freeqty) AS newqtyy, SUM(t.totprice) AS paraprice // FROM(SELECT freeqty, totprice from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and company_name='Energy Foods' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id IN( SELECT user_id from shop_user where new_status='1') $cond9 union all // SELECT freeqty, totprice from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and company_name='Energy Foods' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id =0 $cond9 )t"; $name_2=$DB->query($Query_2); $no_2=mysql_num_rows($name_2); $row_2 = mysql_fetch_array($name_2); $Query_3 = "SELECT sum(qty) as newqtyy from `tbl_order` where productid='$product_id' and orderid IN(SELECT orderid from tbl_confirmorder where company_name='Energy Foods' $cond9 ) and user_id IN( SELECT user_id from shop_user where new_status='1') "; // $Query_3 = " SELECT SUM(t.qty) AS newqtyy, SUM(t.totprice) AS paraprice // FROM(SELECT qty, totprice from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and company_name='Energy Foods' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id IN( SELECT user_id from shop_user where new_status='1') $cond9 union all // SELECT qty, totprice from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where orderstatus!=4 and company_name='Energy Foods' and DATE(order_date_time)>='$date_paid1' and DATE(order_date_time)<='$date_paid12') and user_id =0 $cond9 )t"; $name_3=$DB->query($Query_3); $no_3=mysql_num_rows($name_3); $row_3 = mysql_fetch_array($name_3); /* totamount */ $new_amount=0; /*$Query_mala_amount = "SELECT sum(qty) as newqtyy, from `tbl_order` where productid='$product_id' and orderid IN(SELECT orderid from tbl_confirmorder where company_name='Energy Foods' and contry='India' ) and user_id IN( SELECT user_id from shop_user where new_status='0') $cond9 "; $name_mala_amount=$DB->query($Query_mala_amount); $no_mala_amount=mysql_num_rows($name_mala_amount); $row_mala_amount = mysql_fetch_array($name_mala_amount);*/ /*$Query_1_ind = "SELECT sum(totprice) as newprice from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where company_name='Energy Foods' and contry='India' ) and user_id IN( SELECT user_id from shop_user where new_status='1' ) $cond9 "; $name_1_ind=$DB->query($Query_1_ind); $no_1_ind=mysql_num_rows($name_1_ind); $row_1_ind = mysql_fetch_array($name_1_ind); $Query_1_ind_1 = "SELECT sum(totprice) as newprice from `tbl_order` where productid='$product_id' and freeqty='0' and orderid IN(SELECT orderid from tbl_confirmorder where company_name='Energy Foods' and contry!='India' and country_id='1' ) and user_id IN( SELECT user_id from shop_user where new_status='1' ) $cond9 "; $name_1_ind_1=$DB->query($Query_1_ind_1); $no_1_ind_1=mysql_num_rows($name_1_ind_1); $row_1_ind_1 = mysql_fetch_array($name_1_ind_1);*/ $new_amount=($row_1_ind['newprice']+$row_1_ind['newprice']); /*totamount*/ $nn_ssss_3=$row_3['newqtyy']; $nn_ssss_1=$row_2['newqtyy']; $nn_ssss=$row_1['newqtyy']; if($nn_ssss!='') { $nn_ssss; if($vstatus==1) { $v_qty=($nn_ssss/2); } if($vstatus==7) { $v_qty=($nn_ssss/2); } if($vstatus==6) { $v_qty=($nn_ssss/2); } if($vstatus==2) { $v_qty=($nn_ssss/50); } $v_qty=($v_qty*12); $x = (int)$v_qty; } //sprintf("%02d", $to_hour); ?>
S.No Product Name Company Name Patient Dealer Offer Total Sales Amount
-
-
Total