<?php
 include 'connection.php';


$queryls = "select * from finish_product_master where row_id ='' ";
$resultls = mysqli_query($conn,$queryls);	
while($row=mysqli_fetch_array($resultls))
{
$bar_size=$row['bar_size'];
$material_name=$row['material_name'];
$product_id=$row['product_id'];



$queryls2 = "select * from rowmaterial_master where bar_size = '$bar_size' and material_name='$material_name' ";
$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'];
}


//echo $qrycall = "update finish_product_master set row_id='$row_id',category_name='Complete Shaft',category_id='1',HSN_code='85030029',bar_size_unit='MM' where product_id = '$product_id'";
$qrycall = "update finish_product_master set row_id='$row_id' where product_id = '$product_id'";
$resultlsq = mysqli_query($conn,$qrycall);	

}
