1 2 3 4 5 6 7 8 9 10 11 12 13
| //Format de la date
$format_entree = 'd/m/y'; // format entrée : DD/MM/AA
$format_sortie = 'Y-m-d'; // format sortie : AAAA-MM-DD
$dateMAJ = date_create_from_format($format_entree, $recherche);
//echo $dateMAJ->format($format_sortie);
$RequeteSelect = $BDD -> query('SELECT * from chantier C inner join effectuer E on C.Id_Chantier=E.Id_Chantier inner join personne P on E.Id_Personne=P.Id_Personne inner join typetravaux T on T.Id_TypeTravaux=E.Id_TypeTravaux
where Lib_Chantier like "%' . $recherche . '%"
OR Nom_Personne like "%' . $recherche . '%"
OR Prenom_Personne like "%' . $recherche . '%"
OR DateTravaux = "' . $dateMAJ->format($format_sortie) . '"
order by E.DateTravaux desc limit ' . $PremiereEntree . ', ' . $LigneParPage); |