Bonjour à tous,
Mon bout de code ci-desous permet d'afficher une partie de résultat dans une page avec une option pour visualiser le restant des données.
Cependant, mon select fait un 'order by nom'. Ce qui a pour effet d'afficher l'intégrale des données de la db trié par nom. C'est super,seulement j'aimerais qu'il y ait une ligne vierge dans mon affichage afin de séparer les noms de mon 'order by'
Que faut-il ajouter à mon code pour que l'effet de séparation soit visible.
Toutes infos, idées, aides sont les bienvenues... Merci
Mon code:
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 <?php include('.\include\param.inc.php'); $liendb = mysql_connect($host,$user,$pws); mysql_select_db ($database); ?> <form action="select_frontalier.php" method="post"> <body style="text-align: center" bgcolor="#BDC8DB"> <p align="center"> <table border="2" width="47%" id="table2" bgcolor="#C0C0C0" height="40"> <tr> <td> <p align="center"><b><font size="4">Gestion des missions Hors CRD</font></b> - <b><font size="4"> Sélection DB pour les Frontaliers </font></b></td> </tr> </table> <table border="0" width="66%" id="table3"> <tr> <td width="74"> <a href="http://CRD1045/menu_sylvia"> <img border="0" src="../images/retourG.gif" width="34" height="34"></a></td> <td> <p align="center"> <input type="submit" value="Refresh"></td> <td width="61"> </td> </tr> </table> </p> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="2" id="table1"> <tr> </table> <div align="center"> <table width="66%" border=1 bordercolor="#000000" > <tr> <td class='intitule' style="background-color: #C0C0C0" align="center" width="140"> <font size="3">NOM</font></td> <td class='intitule' style="background-color: #C0C0C0" align="center" width="100"> <font size="3">DATE DEBUT</font></td> <td class='intitule' style="background-color: #C0C0C0" align="center" width="100"> <font size="3">DATE FIN</font></td> <td class='intitule' style="background-color: #C0C0C0" align="center" width="80"> <font size="3">SERVICE</font></td> <td class='intitule' style="background-color: #C0C0C0" align="center"> <font size="3">LIEU</font></td> <td class='intitule' style="background-color: #C0C0C0" align="center" width="100"> <font size="3">DUREE</font></td> </tr> </div> <?php $sql ="SELECT * from crdmission where frontalier='Y' order by nomprenom"; $resultat = mysql_query ($sql); // Initialisation des variables et affichage des resultats while ($crdmission = mysql_fetch_array ($resultat)) { $nummission = $crdmission['nummission']; $nom = $crdmission['nomprenom']; $datedebut = $crdmission['datedeb']; $datedefin = $crdmission['datefin']; $service = $crdmission['service']; $lieumission= $crdmission['lieumission']; $dureemission= $crdmission['dureemission']; echo "<tr>"; echo "<td>$nom</td>"; echo "<td>$datedebut</td>"; echo "<td>$datedefin</td>"; echo "<td>$service</td>"; echo "<td>$lieumission</td>"; echo "<td>$dureemission</td>"; echo "<td>"; echo "<a href='mission_edit.php?nummission=$nummission'>voir</a>"; echo "</form>"; echo "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($liendb); echo "</body>"; echo "</html>"; ?>
Partager