I have two tables, ingredient
and ingredient_language
.
I need to display (from SQL) all translations of each ingredient, and in case that I did not have any translations for some language, in the rows have to appear like this, for example:
Language | Ingredient
ENG Salt
GER NULL
How can I display it?
The structure of the tables are
Ingredient{id_ingredient}
Ingredient_Language{id_ingredient, id_language, traduction}
Thanks.
EDIT:
SELECT i.id_ingredient, l.id_language, l.trad
FROM Ingredient i
LEFT OUTER JOIN Ingredient_language l ON l.id_ingredient = i.id_ingredient
Okey, the structure are:
·Table 1 (Ingredient) > Columns: Id_ingredient (PK), standard_name
·Table 2 (Language) > Columns: ID_Language (PK), name_language
·Table 3 (Ingredient_Language) > Columns: ID_Ingredient_Language (PK),ID_ingredient (FK), ID_LANGUAGE(FK), description
Example of data (Can not do any screen at this moment):
·Table 1: 01, Orange
·Table 2: SP, SPANISH
ENG, ENGLISH
·Table 3: 01, 01, SP, Naranja
What I need to get? The following example:
Header: id_language, id_ingredient, description
Row1: SP 01 NARANJA
Row2: ENG 01 NULL
Thanks for the help.