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
| function recherche_cessation ($connexion,$matricule)
{
$cessations = $connexion->prepare("SELECT
A.matri_employe AS matricule,
E.nom AS nom,
E.prenom AS prenom,
A.numerodecision AS numerodecision,
A.date_decision AS date_decision,
A.tranche AS tranche,
A.date_debut AS date_debut,
A.date_fin AS date_fin,
T.designation_conge AS designation_conge,
T.nbre_jour AS nbre_jour
FROM absences A
JOIN employes E
ON E.num_matricule = A.matri_employe
JOIN type_conge T
ON A.id_type = T.id_type_conge
WHERE A.motif ='Congés'
AND A.matri_employe = :matricule
");
$cessations->bindParam(':matricule', $matricule, PDO::PARAM_STR);
$cessations->execute();
return $cessations->fetch(PDO::FETCH_OBJ);
} |