<?php
require_once './connectioni_branches.php';


  	$sql="select * from s_mas";
	   $result=mysqli_query($GLOBALS['dbinv'],$sql);
	while($row = mysqli_fetch_array($result)){
		
	
		$sql2="update s_mas set   SELLING='".$row["SELLING"]."',COST='".$row["MIN_SELLING"]."' WHERE stk_no = '". $row["STK_NO"] . "'"; echo $sql2.'<br>';
		mysqli_query($GLOBALS['dbinvBt'],$sql2);
		
		$sql2="update s_mas set   SELLING='".$row["SELLING"]."',COST='".$row["MIN_SELLING"]."' WHERE stk_no = '". $row["STK_NO"] . "'"; echo $sql2.'<br>';
		mysqli_query($GLOBALS['dbinvKd'],$sql2);
		
		$sql2="update s_mas set   SELLING='".$row["SELLING"]."',COST='".$row["MIN_SELLING"]."' WHERE stk_no = '". $row["STK_NO"] . "'"; echo $sql2.'<br>';
		mysqli_query($GLOBALS['dbinvKp'],$sql2);
		
		
 
			
	}
	
	echo "Updated";
	
	?>