Tanggal

"; } ?>
Test Value Mean (SD) $tname $tmean ($tsd)

$value) { if($value != '') { $sql = "if exists (select * from DAILY_RESULT where controlid='$controlid' and testid='$testid' and resdate='$date 00:00') update DAILY_RESULT set resvalue='$value' where controlid='$controlid' and testid='$testid' and resdate='$date 00:00' else insert into DAILY_RESULT(controlid, testid, resvalue, resdate) values ('$controlid', '$testid', '$value', '$date 00:00')"; } else { $sql = "if exists (select * from DAILY_RESULT where controlid='$controlid' and testid='$testid' and resdate='$date 00:00') delete from DAILY_RESULT where controlid='$controlid' and testid='$testid' and resdate='$date 00:00'"; } //echo "
$sql

"; $stmt = sqlsrv_query( $conn1, $sql ); if( $stmt == false) { die( print_r( sqlsrv_errors(), true) ); } } echo "Data updated..."; } ?>