1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| <?php
//se connecter à msql
include('Includes\_connexion.php');
//récupérer les données de la table section
$sql = 'SELECT a.id, a.nom, a.prenom, a.adresse, a.ville, a.cp,
a.date_naissance AS `date de naissance`,
a.tel_dom AS `telephone domicile`, a.tel_portable AS `n° portable`,
a.nationalite, a.taille, a.poids, a.sexe,
technique.ceinture, technique.grade,
catégorie.categorie
FROM adherent AS a
INNER JOIN r_adh_tech
ON a.id = r_adh_tech.idadherent
INNER JOIN technique
ON technique.id = r_adh_tech.idtechnique
INNER JOIN r_adh_cat
ON a.id = r_adh_cat.idadherent
INNER JOIN catégorie AS c
ON catégorie.id = r_adh_cat.idcategorie
WHERE enable = 1
AND idsection = 3';
//exécuter la requête
$result = mysql_query($sql, $cnn)
or die ('requête invalide : <br />'.mysql_error());
//$nomb_lignes=mysql_num_rows($result);
while ($adherent = mysql_fetch_assoc($result)) {
?>
<tr>
<?php
foreach($adherent as $champ => $valeur){
$string = $valeur ? $valeur : '<i>NULL</i>';
?>
<td><?php echo $champ.' : '.$string; ?></td>
<?php
}
?>
</tr>
<tr>
<td colspan="<?php echo count($adherent); ?>" align="center">
<a href="delete_adherent.php?idadh=<?php echo $adherent['id']; ?>"><img src="../templates/images/delete.gif" border="0"></a>
</td>
</tr>
<?php
}
?> |
Partager