Bonjour,
Quelques petites explications s'il vous plait je ne comprend pas bien, c'est vraiment bizarre.
J'ai fait 6 tableau sur ma page pour récupérer des données provenant de ma BDD.
En fait ça ne fonctionne pas comme je le voudrais non pas pour récupérer les données mais pour les afficher correctement.
Chaque fois que je rajoute une données via mon formulaire ça me rajoute un tableau en fait ça m'affiche 1 données par tableau.
Par exemple tous les utilisateurs qui ont 1 clairon s'affiche dans la table "clairon"
Cela est fait pour la gestion d'instruments de musique
Je vous donne mon code il est long mais c'est juste mes 6 tableaux HTML
Merci vraiment pour votre aide.
<?php
$resultats = $bdd->query("SELECT *
FROM utilisateur
WHERE 'utilisateur'.'clairon_numero' <> ''
OR 'utilisateur'.'cor_numero' <> ''
OR 'utilisateur'.'tptecaval_numero' <> ''
OR 'utilisateur'.'tambour_numero' <> ''
OR 'utilisateur'.'cymbale_numero' <> ''
OR 'utilisateur'.'grosse_caisse_numero' <> ''
AND 'utilisateur'.'membre' <> 'sortant'
AND 'utilisateur'.'nom' <> 'ADMINISTRATEUR'
AND 'utilisateur'.'membre' <> 'non_musicien'
ORDER BY clairon_numero, cor_numero ASC");
$donnees = $resultats->setFetchMode(PDO::FETCH_OBJ);
while ($donnees = $resultats->fetch())
{
?>
<!-- TABLEAU CLAIRON -->
<table style="width: 500; float: left">
<tr>
<td class="table-separateur">
<table width="100%" border="2" cellspacing="1" cellpadding="5">
<tr><td class="table-titre" colspan="5">CLAIRON</td></tr>
<tr>
<th width="100" class="table-entete">Nom / Prénom</th>
<th width="100" class="table-entete-centre">Numéro</th>
<th width="100" class="table-entete">Embouchure</th>
<th width="100" class="table-entete">Poignée</th>
<th width="100" class="table-entete">Cordon</th>
</tr>
<tr>
<td width="100" class="table-ligne1"><?php echo $donnees->nom.' </b>'.$donnees->prenom; ?></td>
<td width="100" class="table-ligne1-centre"><?php echo $donnees->clairon_numero;?></td>
<td width="100" class="table-ligne1"><?php if($donnees->embouchure_cl==1){ echo $donnees->embouchure_cl;}?></td>
<td width="100" class="table-ligne1"><?php if($donnees->poignee_cl==1){ echo $donnees->poignee_cl;}?></td>
<td width="100" class="table-ligne1"><?php if($donnees->cordon_cl==1){ echo $donnees->cordon_cl;}?></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- TABLEAU COR -->
<table width="300">
<tr>
<td class="table-separateur">
<table width="100%" border="2" cellspacing="1" cellpadding="5">
<tr><td class="table-titre" colspan="3">COR</td></tr>
<tr>
<th width="100" class="table-entete">Nom / Prénom</th>
<th width="100" class="table-entete-centre">Numéro</th>
<th width="100" class="table-entete">Embouchure</th>
</tr>
<tr>
<td width="100" class="table-ligne1"><?php echo $donnees->nom.' </b>'.$donnees->prenom; ?></td>
<td width="100" class="table-ligne1-centre"><?php echo $donnees->cor_numero;?></td>
<td width="100" class="table-ligne1"><?php if($donnees->embouchure_cor==1){ echo $donnees->embouchure_cor;}?></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- TABLEAU TROMPETTE DE CAVALERIE -->
<table style="width: 500; float: left">
<tr>
<td class="table-separateur">
<table width="100%" border="2" cellspacing="1" cellpadding="5">
<tr><td class="table-titre" colspan="5">TROMPETTE DE CAVALERIE</td></tr>
<tr>
<th width="100" class="table-entete">Nom / Prénom</th>
<th width="100" class="table-entete-centre">Numéro</th>
<th width="100" class="table-entete">Embouchure</th>
<th width="100" class="table-entete">Poignée</th>
<th width="100" class="table-entete">Cordon</th>
</tr>
<tr>
<td width="100" class="table-ligne1"><?php echo $donnees->nom.' </b>'.$donnees->prenom; ?></td>
<td width="100" class="table-ligne1-centre"><?php echo $donnees->tptecaval_numero;?></td>
<td width="100" class="table-ligne1"><?php if($donnees->embouchure_tptecav==1){ echo $donnees->embouchure_tptecav;}?></td>
<td width="100" class="table-ligne1"><?php if($donnees->poignee_tptecav==1){ echo $donnees->poignee_tptecav;}?></td>
<td width="100" class="table-ligne1"><?php if($donnees->cordon_tptecav==1){ echo $donnees->cordon_tptecav;}?></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- TABLEAU CYMBALES -->
<table width="200">
<tr>
<td class="table-separateur">
<table width="100%" border="2" cellspacing="1" cellpadding="5">
<tr><td class="table-titre" colspan="2">CYMBALES</td></tr>
<tr>
<th width="100" class="table-entete">Nom / Prénom</th>
<th width="100" class="table-entete-centre">Numéro</th>
</tr>
<tr>
<td width="100" class="table-ligne1"><?php echo $donnees->nom.' </b>'.$donnees->prenom; ?></td>
<td width="100" class="table-ligne1-centre"><?php echo $donnees->cymbale_numero;?></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- TABLEAU TAMBOUR -->
<table style="width: 400; float: left">
<tr>
<td class="table-separateur">
<table width="100%" border="2" cellspacing="1" cellpadding="5">
<tr><td class="table-titre" colspan="4">TAMBOUR</td></tr>
<tr>
<th width="100" class="table-entete">Nom / Prénom</th>
<th width="100" class="table-entete-centre">Numéro</th>
<th width="100" class="table-entete">Baudrier</th>
<th width="100" class="table-entete">Baguettes</th>
</tr>
<tr>
<td width="100" class="table-ligne1"><?php echo $donnees->nom.' </b>'.$donnees->prenom; ?></td>
<td width="100" class="table-ligne1-centre"><?php echo $donnees->tambour_numero;?></td>
<td width="100" class="table-ligne1"><?php echo $donnees->baudrier_numero;?></td>
<td width="100" class="table-ligne1"><?php echo $donnees->baguette_numero;?></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- TABLEAU GROSSE CAISSE -->
<table width="200">
<tr>
<td class="table-separateur">
<table width="100%" border="2" cellspacing="1" cellpadding="5">
<tr><td class="table-titre" colspan="2">GROSSE CAISSE</td></tr>
<tr>
<th width="100" class="table-entete">Nom / Prénom</th>
<th width="100" class="table-entete-centre">Numéro</th>
</tr>
<tr>
<td width="100" class="table-ligne1"><?php echo $donnees->nom.' </b>'.$donnees->prenom; ?></td>
<td width="100" class="table-ligne1-centre"><?php echo $donnees->grosse_caisse_numero;?></td>
</tr>
</table>
</td>
</tr>
</table>
<?php
}
?>
Afficher la suite