0
I have the following scenario:
Revenue Table
---------------------
id
name
method of preparation
category
Ingredient Table
--------------------------
id
name
Table Ingrediente_recipe
--------------------------------------
id
id_recipe
id_ingredient
I want to make a select that brings the recipes with their respective ingredients according to the ingredients I inform.
Ex: select from the recipes that have flour, egg and sugar (I want you to bring recipes that have only these 3 ingredients, if the recipe has any other ingredients, I do not want to appear)
Supposing a carrot cake only has these three ingredients
I don’t want you to bring it like this:
1| Carrot cake | method of preparation: blablabla | Category: Sweets | flour
1| Carrot cake | way of preparation: blablabla | Category: Sweets | egg
1| Carrot cake | method of preparation: blablabla | Category: Sweets | sugar
I want you to bring it like this (All in the same line):
1| Carrot cake | method of preparation: blablabla | Category: Sweets | flour | egg | sugar
Database: Mysql
Can you help me? Thank you.
What you already have of code ?
– Vinicius Shiguemori