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

ingredients != ingredientId

parent 63af7d91
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,6 @@ class Recette{
$queryString .= " AND nom LIKE :name";
}
if(!empty($ingredients)){
print_r($ingredients);
$ingredientsIn = implode(',', $ingredients);
$queryString .= " AND ingredientId IN (:ingredients)";
}
......@@ -57,7 +56,7 @@ class Recette{
$name = "%".$name."%";
$query->bindParam(':name', $name);
}
if(!empty($ingredientId)){
if(!empty($ingredients)){
$query->bindParam(':ingredients', $ingredientsIn);
}
if(!empty($difficulte)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment