ajout model lecture page

This commit is contained in:
ryana 2026-06-08 13:51:57 +02:00
parent b9b903dee6
commit b07fd41fa0

View file

@ -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);