Page 3 of 3

Posted: Tue Mar 02, 2004 10:36 pm
by markl999
ok, i *think* i see what you want exactly now..i think..
So try :

Code: Select all

$count=0;
while($periksa=mysql_fetch_array($viewCheck)) 
{ 

  $MTTF=$_POST["MTTF"]; 
  $bd=$_POST["purataMasaBD"]; 
  $pb=$_POST["purataMasaPPM"]; 
  $bilInspection=$periksa["n"]; 
  $bt1=exp(-$MTTF*$bilInspection); 
  $bt2=$bt1/($MTTF/$bilInspection); 
  $bt3=1-$bt2; 
  $gagal=explode(',', $_POST["gagal"]); 
  $dt1=($gagal[$count]*$bilInspection*$bd*$bt3)+$pb; 
  $dt2=$bilInspection+$pb; 
  $minDownTime=$dt1/$dt2; 
  $minDownTime1=number_format($minDownTime, 5, '.', ''); 
  $SQLupd=mysql_query("UPDATE mindowntime SET Dn = '$minDownTime1' where n='$bilInspection'"); 
  $count++;
}