1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
$req="select nom_materiel, COUNT(article) as quantite_stockee
from article,materiel
where materiel.id_materiel=article.materiel_idmateriel
and nom_materiel='".$donnees['nom_materiel']."'
group by nom_materiel";
$reponse2 = mysql_fetch_assoc(mysql_query($req));
$nb=$donnees['quantite_totale_par_article_commandee']-$reponse2['quantite_totale_par_article_sorties'];
echo '<tr bgcolor="'.$bgcolor.'"><td>'.$donnees['nom_materiel'].'</td><td>'.$nb."</td></tr>";
}
if($nb <= 80)
{
echo"<script language=\"javascript\">";
echo"alert('bonjour')";
echo"</script>";
} |
Partager