"; } include("connexion.php"); $requete = "SELECT * FROM banc"; $exec_requete = mysqli_query($db,$requete); $banc = mysqli_fetch_all($exec_requete); $requete = "SELECT count(*) FROM banc"; $exec_requete = mysqli_query($db,$requete); $nb_banc = mysqli_fetch_all($exec_requete); $nouv_banc = $nb_banc[0][0]+1; /* Affichage des appareils */ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; foreach($banc as $value){ echo ""; echo ""; $requete = "SELECT count(*) FROM equipement WHERE num=$value[0]"; $exec_requete = mysqli_query($db,$requete); $reponse = mysqli_fetch_all($exec_requete); echo ""; echo ""; echo ""; } /* Ajout appareil */ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
BancNombre d'appareil
".$value[0]."".$reponse[0][0].""; if($value[0]==$nouv_banc-1){ echo "
"; } echo "
$nouv_banc
"; echo ""; mysqli_close($db); ?>