<?
session_start();
 include("../../test.php");
 include ("../../opendb.php");

$sql1="select code,msno from minput";
$re=mysqli_query($db,$sql1) or die(mysqli_error($db));
while($row=mysqli_fetch_array($re))
{
$sql="update mdet set code='$row[0]' where mcsno='$row[1]'";
print $sql;
mysqli_query($db,$sql);
}
?>
