Commit eb17fbdc authored by Gaetan Carabetta's avatar Gaetan Carabetta

update app

parent 5d056f69
<html>
<head>
<title>Clinique Veterinaire</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h1>Gestion de la clinique</h1>
<table border="1">
<tr><th>Numéro</th><th>Nom</th><th>Population</th></tr>
<?php
// Connexion à la base de données
$vHost = 'tuxa.sme.utc';
$vPort = '5432';
$vData = 'dbbdd0p042';
$vUser = 'bdd0p042';
$vPass = 'cyLu9JFl';
$vConn = new PDO("pgsql:host=$vHost;port=$vPort;dbname=$vData", $vUser, $vPass);
// Affichage du tableau de données
// $vSql ='';
// $vSt = $vConn->prepare($vSql);
// $vSt->execute();
// while ($vResult = $vSt->fetch(PDO::FETCH_ASSOC)) {
// echo '<tr>';
// echo "<td>$vResult[]</td>";
// echo "<td>$vResult[]</td>";
// echo "<td>$vResult[]</td>";
// echo '</tr>';
// }
?>
</table>
<ul>
<?php
$vSql ='';
$vSt = $vConn->prepare($vSql);
$vSt->execute();
$vResult = $vSt->fetch(PDO::FETCH_ASSOC);
echo "<li>Département le plus peuplé : <b>$vResult[__________]</b></li>";
$vSql ='______________________________________________________________';
$vSt = $vConn->prepare($vSql);
$vSt->execute();
$vResult = $vSt->fetch(PDO::FETCH_ASSOC);
echo "<li>Département le moins peuplé : <b>$vResult[__________]</b></li>";
?>
</ul>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment