<?php
require("calldata.php");
$sql = "SELECT * FROM pgdata20";
$result = mysql_query($sql, $link);
$n=1;
while( $row = mysql_fetch_row( $result ) ){
$matrix[$n][1] = $row[0];
$matrix[$n][2] =$row[1];
$n=$n+1;
}
for ($n=1; $n < 95; $n++) {
$byear =$matrix[$n][1];
$mtime[$byear] = $matrix[$n][2];
}
$sql = "SELECT * FROM pgdata22";
$result = mysql_query($sql, $link);
$n=1;
while( $row = mysql_fetch_row( $result ) ){
$matrix[$n][1] = $row[0];
$matrix[$n][2] =$row[1];
$n=$n+1;
}
for ($n=1; $n < 95; $n++) {
$byear =$matrix[$n][1];
$ftime[$byear] = $matrix[$n][2];
}
$sql = "truncate pgdata24";
$exe= mysql_query($sql,$link);
for ($byear=1941;$byear<2035;$byear++){
$x=$mtime[$byear];
$y=$ftime[$byear];
$sql = "insert into pgdata24 values($byear,$x,$y)";
$exe= mysql_query($sql,$link);
}
$close_flag = mysql_close($link);
?>
最終更新:2009年06月11日 06:37