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
|
<table id="tab" class="display">
<thead>
<tr>
<th>CTL_CODE</th>
<th>Description</th>
<th>Lancement</th>
<th>Heure_Deb_Prevue</th>
<th>Heure_Deb_Reelle</th>
<th>Heure_Fin_Reelle</th>
<th>Heure_Ctl</th>
<th>Commentaires</th>
<th>Acquittement</th>
<th>Reference_Traitement</th>
</tr>
</thead>
<tbody>
<?php
//On affiche les lignes du tableau une à une à l'aide d'une boucle
//Attention ! Si il y a une erreur dans l'un des champs, la boucle est arrêtée et le tableau ne contient pas toute la bdd
while ($donnees = sqlsrv_fetch_array($result)) {
?>
<tr>
<td><?php echo $donnees['CTL_CODE']; ?></td>
<td><?php echo $donnees['Description']; ?></td>
<td><?php echo $donnees['Lancement']; ?></td>
<td><?php echo $donnees['DateHeure_prevue_deb_app']->format('Y-m-d H:i:s'); ?></td>
<td><?php
if (empty($donnees['DateHeure_deb_reelle'])) {
echo $donnees['DateHeure_deb_reelle'];
} else {
echo $donnees['DateHeure_deb_reelle']->format('Y-m-d H:i:s');
}
?></td>
<td><?php
if (empty($donnees['DateHeure_fin_reelle'])) {
echo $donnees['DateHeure_fin_reelle'];
} else {
echo $donnees['DateHeure_fin_reelle']->format('Y-m-d H:i:s');
}
?></td>
<td id="hctl"><?php echo $donnees['Heure_ctl']; ?></td>
<td><?php echo $donnees['Commentaires']; ?></td>
<td></td>
<td><?php echo $donnees['Reference_Traitement']; ?></td>
</tr>
<?php
} //fin de la boucle, le tableau contient toute la BDD
sqlsrv_close($conn); //deconnection de mysql
?>
</tbody>
</table> |