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

ingredients != ingredientId

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