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
| <?php
require 'include/sqlconnect.php';
include("menu.php");
?>
<link rel="stylesheet" href="menu/dropdown_three.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<table class="bicolor" width="90%" border="1" align="center">
<tr>
<th class="intitule">Nombre place</th>
<th class="intitule">NumPlace</th>
<th class="intitule">Prix</th>
<th class="intitule">Somme</th>
<th class="intitule">Nom</th>
<th class="intitule">Prénom</th>
<th class="intitule">Instrument</th>
</tr>
<?php
$sth = $bdd->query("SELECT
IDNPlace,
NumPlace,
Reférence,
Personnes.IDPersonne,
Personnes.Nom_Personne,
Personnes.Prenom_Personne,
Personnes.Paiement,
Personnes.Motet,
Instruments.Instrument,
Concert.IDconcert,
Concert.titreconcert,
Concert.lieu,
DATE_FORMAT ( Concert.dateconcert, '%d/%m/%Y' ) AS datecon,
Zones.IDZone,
Zones.Zone,
Prix.IDPrix,
Prix.Prix,
SUM(Prix.Prix) AS prixbillets,
COUNT(Prix.Prix) AS nbillets
FROM Tab_NumPlace
INNER JOIN Personnes ON Tab_NumPlace.IDPersonne = Personnes.IDPersonne
INNER JOIN Instruments ON Personnes.IDInstruments = Instruments.IDInstruments
INNER JOIN Concert ON Tab_NumPlace.IDconcert = Concert.IDconcert
INNER JOIN Zones ON Tab_NumPlace.IDZone = Zones.IDZone
INNER JOIN Prix ON Zones.IDPrix = Prix.IDPrix
WHERE Concert.IDconcert = '1'
GROUP BY IDPersonne
ORDER BY Nom_Personne, Prenom_Personne");
while($row = $sth->fetch(PDO::FETCH_ASSOC))
{
$id = $row['IDNPlace'];
echo "<tr>";
echo "<td>" . $row['nbillets'] . "</td>";
echo "<td>" . $row['NumPlace'] . "</td>";
echo "<td>" . $row['Prix'] . "</td>";
echo "<td>" . $row['prixbillets'] . "</td>";
echo "<td>" . $row['Nom_Personne'] . "</td>";
echo "<td>" . $row['Prenom_Personne'] . "</td>";
echo "<td>" . $row['Instrument'] . "</td>";
echo "</tr>";
}
$sth->closeCursor();
echo "</table>";
?> |
Partager