ajout model lecture page
This commit is contained in:
parent
b9b903dee6
commit
b07fd41fa0
1 changed files with 11 additions and 0 deletions
|
|
@ -1 +1,12 @@
|
|||
<?php
|
||||
|
||||
$pdo = new PDO('mysql:host=localhost;dbname=projet3_tp1;charset=utf8mb4', 'root', '');
|
||||
|
||||
$date = $_GET['date'] ?? date('Y-m-d');
|
||||
|
||||
$sauveteurs = $pdo->query('SELECT ID_Sauveteur, Nom, Prenom, Specialite FROM Sauveteur ORDER BY Nom, Prenom')->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
$stmt = $pdo->prepare('SELECT ID_Mission, DtaHeureDebut, DtaHeureFin, ID_Sauveteur FROM Mission WHERE DATE(DtaHeureDebut) = ? OR DATE(DtaHeureFin) = ?');
|
||||
$stmt->execute([$date, $date]);
|
||||
$missions = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue