Skip to content
Snippets Groups Projects
Commit 07ca9184 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

fixed query

parent 799f31f8
Branches
No related tags found
No related merge requests found
......@@ -37,6 +37,14 @@ class Recette{
if(!empty($auteurId)){
$queryString .= " AND auteurId=:auteurId";
}
// Dernier ajout important
$queryString .= " GROUP BY m_recette.id";
// Having Count pour les ingredients
if(!empty($ingredients)){
$queryString .= " HAVING COUNT(m_recette.id)="+count($ingredients);
}
// On la prépare
$query = Connexion::pdo()->prepare($queryString." ORDER BY nom");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment