| Current Path : /home/ataenra/www/ATA/INTRANET/Admin/Gestion_Materiel/ |
| Current File : /home/ataenra/www/ATA/INTRANET/Admin/Gestion_Materiel/Courbe.php |
<?php
require "../../Outils/co.php";
$list1 = $dbco->prepare("SELECT * FROM gest_produits_pac_ae WHERE Emp = 'UE' ");
$list1->execute();
while($L1 = $list1->fetch(PDO::FETCH_OBJ)) {
$Pn35=$L1->P7m35;$Pp35=$L1->P7p35;
$Pn55=$L1->P7m55;$Pp55=$L1->P7p55;
$Pn70=$L1->P7m70;$Pp70=$L1->P7p70;
$Dt35=$Pp35-$Pn35;
$Dt55=$Pp55-$Pn55;
$Dt70=$Pp70-$Pn70;
if($Dt35 !=0) {$A35=round($Dt35/14,2);$B35=$Pn35-(-($Dt35/2));}else{$A35=0;$B35=0;};
if($Dt55 !=0) {$A55=round($Dt55/14,2);$B55=$Pn55-(-($Dt55/2));}else{$A55=0;$B55=0;};
if($Dt70 !=0) {$A70=round($Dt70/14,2);$B70=$Pn70-(-($Dt70/2));}else{$A70=0;$B70=0;};
$UP2 = $dbco->prepare("UPDATE gest_produits_pac_ae set ID_Produit = :id, A35 =:A35, B35=:B35, A55=:A55, B55=:B55, A70=:A70, B70=:B70 where ID_Produit = :id");
$UP2->bindvalue('id',$L1->ID_Produit);
$UP2->bindvalue('A35',$A35);
$UP2->bindvalue('B35',$B35);
$UP2->bindvalue('A55',$A55);
$UP2->bindvalue('B55',$B55);
$UP2->bindvalue('A70',$A70);
$UP2->bindvalue('B70',$B70);
$UP2->execute();
}
?>