<?php 
include 'connection.php';

$query2job = "select * from temp_01 ";
$resultjob = mysqli_query($conn,$query2job);
while($row=mysqli_fetch_array($resultjob))
		{  
		
				$item_code =$row['item_code'];
				$DRAWING_NO=$row['DRAWING_NO'];
								$CUT=$row['CUT'];
				$DE=$row['DE'];
				$FINISH=$row['FINISH'];
				$NDE=$row['NDE'];

				
				$query2s = "select * from finish_product_master where item_code = '$item_code'";
//echo $query2s;
$result2s = mysqli_query($conn,$query2s);	
$num_rows2s = mysqli_num_rows($result2s);
if($num_rows2s =='1') { 

echo $query1aa = "update finish_product_master set DRAWING_NO ='$DRAWING_NO',CUT='$CUT',FINISH='$FINISH',DE='$DE',NDE='$NDE' where  item_code='$item_code' " ;
//echo $query1aa;
//$r1aa=mysqli_query($conn,$query1aa);
echo $query1aa = "update temp_01 set product_id ='YES' where  item_code='$item_code' " ;
//echo $query1aa;
//$r1aa=mysqli_query($conn,$query1aa);

}



}
?>