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
| <?php
echo '<table>';
echo'<tr><th>ID du traitement</th><th>date</th><th>type</th><th>URL</th><th>Statut</th></tr>';
try
{
$dns = 'mysql:host=toto;dbname=autoadhoc;port=3307';
$utilisateur = 'titi';
$motDePasse = 'titi';
$bdd = new PDO($dns, $utilisateur, $motDePasse);
//$bdd = new PDO('mysql: host=localhost;port =3307;dbname=autoadhoc','adhoc','adhoc');
$bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$bdd->exec("SET CHARACTER SET utf8");
}
catch(PDOException $e) //en cas d'erreur
{
//message erreur
echo "probleme de connection";
}
$retour =$bdd->query('SELECT * FROM traitements ORDER BY trt_id_traitement DESC');
while ($donnees = $retour->fetch()) // On fait une boucle pour lister les résultats
{
?>
<tr>
<td><?php echo $donnees['trt_id_traitement']; ?></td>
<td><?php echo $donnees['trt_dh_debut']; ?></td>
<td><?php echo "type" ?></td>
<td><a href="file://///frwplch-nas03/auto_adhoc/Usage_Restitution/102/Usage_Restitution_biscuits.txt">Lien</a></td> // Problème
<td><?php echo $donnees['tst_id_statut']; ?></td>
</tr>
<?php
} // Fin de la boucle
echo'</table>'; |
Partager