Thanks for the reply, I am however not entirely sure that I understand your CASE-solution. Let me just explain what I am looking after so I'm sure we are on the same frequency.
I have the following tables:
"Object"
ID
BaseLanguage
"ObjectString"
ObjectID
Language
Name
The tables contain following data:
"Object"
ID | BaseLanguage
1 | English
2 | English
"ObjectString"
ObjectID | Language | Name
1 | English | Cat
1 | Swedish | Katt
2 | English | Dog
ObjectID is a foreign key referencing Object's ID. ID is a primary key.
If a user is Swedish and has a chosen language of Swedish he will get "Katt" but not "dog" with my following query.
"SELECT * FROM Object
LEFT JOIN ObjectString ON ObjectString.ObjectID = ID
WHERE Language='$preferedLanguage'"
What I want is that he/she gets the English version of dog too because it is the default language. I am not sure how to further develop my query, though, to make this work.
I think you have understood my problem correct. Not entirely sure, though, how to use the CASE WHEN-methodology in my sql. :/
Once again, really appreciate your answer.