$query="update attendance
SET
`day1`='$day1', `day2`='$day2', `day3`='$day3', `day4`='$day4',
`day5`='$day5', `day6`='$day6', `day7`='$day7', `day8`='$day8',
`day9`='$day9', `day10`='$day10', `day11`='$day11', `day12`='$day12',
`day13`='$day13', `day14`='$day14', `day15`='$day15', `day16`='$day16',
`day17`='$day17', `day18`='$day18', `day19`='$day19', `day20`='$day20',
`day21`='$day21', `day22`='$day22', `day23`='$day23', `day24`='$day24',
`day25`='$day25', `day26`='$day26', `day27`='$day27', `day28`='$day28',
`day29`='$day29', `day30`='$day30', `day31`='$day31', `accident`='$a1',
`disiplinary`='$d1', `family_death`='$fd1', `family_illness`='$fi1',
`holiday`='$h1', `illness`='$i1', `jury_duty`='$j1', `leave`='$l1',
`layoff`='$lo1', `personal`='$p1', `tardy`='$t1', `vacation`='$v1'
WHERE `month`='January'";
$result=mysql_query($query);
ここでは、day1
値が更新され(値は1)、次に値を更新するday2
と1になり、その時点でday2
値は更新されます(1)が、day1
値はゼロに変更されます。
私がやること?