Bonjour,
je fais afficher une liste allant de la lettre A à Z d'après laquelle le récupère une liste d'objet.Lorsque cette liste est vide je veut faire apparaitre un message me disant qu'il n'y a aucun objet pour cette lettre.
Je récupère toujours la dernière lettre qui est le Z.
Comment faire pour récupèrer les autres valeurs.
Voici mon code
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Document sans titre</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="../MisePage12.css"/> <body> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="L1"><p>Liste des DVD </p> <p>Nombres total de DVD : <?php echo $totalRows_RsListeDVD ?> </p></td> </tr> <tr class="L2"> <td class="L2C1"></td> <td class="L2C2"> <div id="navcontainer"> <ul id="navlist"> <li id="active"><a href="Index.php" id="current">Accueil</a></li> <li><a href="ConsulterListeDVD.php">DVD</a></li> <li><a href="connexion.php" style="color:#FF0000">Connexion</a></li> </ul> </div></td> <td class="L2C3BIS"></td> </tr> <tr class="L3"> <td class="L3C1"> </td> <td class="L3C2"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="30px" class="Message"><?php if ($totalRows_RsListeDVD == 0 ) {echo "Pas de DVD dans la Médiathèque" ; } else{ $ID='0'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='1'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='2'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='3'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='4'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='5'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='6'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='7'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='8'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='9'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='A'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='B'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='C'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='D'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='E'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='F'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='G'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='H'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='I'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='J'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='K'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='L'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='M'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='N'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='O'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='P'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='Q'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='R'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='S'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='T'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='U'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='V'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='W'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='X'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='Y'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; $ID='Z'; echo '<a href="ConsulterListeDVD.php?TitreID='.$ID.'">'.$ID.' </a>' ; }?></td> </tr> <tr> <td height="526px" align="center"> <table border="0" cellpadding="0" cellspacing="0" width="700"> <?php do { ?> <tr> <td><div align="center"> <?php if ($totalRows_RsListeDVD != 0 ) { if ($totalRows_RsRecherche == 0 ) { echo "Pas de DVD commençant par la lettre : $ID" ; } else { $ID=$row_RsRecherche['FldIdref']; echo '<a href="ConsulterDVD.php?TitreID='.$ID.'">'.$row_RsRecherche['FldTitre'].'</a>'; } }?> </div></td> </tr> <?php } while ($row_RsRecherche = mysql_fetch_assoc($RsRecherche)); ?> </table></td> </tr>







Répondre avec citation
Partager