<?php
 include 'connection.php';


$queryls = "select * from customer_po_more_product_02 where status='' ";
$resultls = mysqli_query($conn,$queryls);	
while($row=mysqli_fetch_array($resultls))
{

$cust_po_more_product_id=$row['cust_po_more_product_id'];

$item_code=$row['item_code'];

$bar_size='';
$material_name='';
$row_id='';
$product_id='';
$category_name='';
$HSN_code='';
$category_id='';

echo $queryls2 = "select * from finish_product_master where  item_code ='$item_code'";
$resultls2 = mysqli_query($conn,$queryls2);	
while($row=mysqli_fetch_array($resultls2))
{
$bar_size=$row['bar_size'];
$material_name=$row['material_name'];
$row_id=$row['row_id'];
$product_id=$row['product_id'];
$category_name=$row['category_name'];
$HSN_code=$row['HSN_code'];
$category_id=$row['category_id'];
}



echo $qrycall = "update customer_po_more_product_02 set row_id='$row_id',product_id='$product_id',material_name='$material_name',bar_size='$bar_size',category_name='$category_name',category_id='$category_id',HSN_code='$HSN_code',status='SAVE' where cust_po_more_product_id = '$cust_po_more_product_id'";
$resultlsq = mysqli_query($conn,$qrycall);	

}
