<?php
$handle = fopen("data05.csv", "r");
$n = 1;
while (($csvdata = fgetcsv($handle,100000,",")) !== FALSE) {
for ($c=0; $c < 5; $c++) {
$data[$n] = $csvdata[$c];
$n = $n +1;
}
}
fclose($handle);
require("calldata.php");
$sql = "truncate eli05";
$exe= mysql_query($sql,$link);
$maxn=94*55+1;
for ($n=1;$n<$maxn;$n++){
$year=$data[5*$n-4];
$age=$data[5*$n-3];
$x=$data[5*$n-2];
$y=$data[5*$n-1];
$z=$data[5*$n];
$sql = "insert into eli05 values($year,$age,$x,$y,$z)";
$exe= mysql_query($sql,$link);
}
$close_flag = mysql_close($link);
print("05 労働力率 計算終了");
?>
最終更新:2010年08月10日 06:23