Skip to content
Extraits de code Groupes Projets
Valider b441969e rédigé par Yann LUMIA's avatar Yann LUMIA
Parcourir les fichiers

pub

parent 5d24a284
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
<?php
include("BDD.php");
$sql="select * from Theme";
$result=pg_query($connexion, $sql);
while($row=pg_fetch_row($result))
{
//les films associés au thème
$sql2="select * from Contenir natural join Film where id_theme = $row[0]";
$film= pg_query($sql2);
//le nombre de votes du thème
$sql2="select count(*) from Voter where id_theme = $row[0]";
$votes=pg_query($sql2);
?>
<div class="container con ">
<h2><a href="#/" class="btn-voter" id="<?php echo $row[0]; ?>" >
<span class="glyphicon glyphicon-heart"></span><span class="badge">
<?php $row=pg_fetch_row($votes); ?>
</span></a> <?php echo "$row[0]"; ?> </h2>
<p><?php echo $row[0]; ?> </p>
<div class="table-responsive">
<table class="table">
<thead>
<th>#</th>
<th>Nom du film</th>
<th>Date de sortie</th>
<th>Réalisateur</th>
<th>Durée</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<?php
$i=0;
while ($fil_tab=pg_fetch_row($film))
{
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $fil_tab['titres'] ;?></td>
<td><?php echo $fil_tab['annee_sortie'] ;?></td>
<td><?php echo $fil_tab['realisateur'] ;?></td>
<td><?php echo $fil_tab['description_film'] ;?></td>
</tr>
<?php $i=$i+1; } ?>
</tbody>
</table>
</div>
</div>
<?php
}
?>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter