There was a thread on this topic about a month ago, but I didn't really understand how to apply the answer to my situation - hope you don't mind if I start a new thread.
I have a table of products with descriptions in different languages, it looks like this:
prodcode - language - description
AAA English Widget
AAA Korean (Widget in Korean)
AAA German etc...
I want to build an array in two languages, it would be like this, for example, if the chosen languages were English and Korean:
prodcode - description in l1 - description in l2
AAA Widget (Widget in Korean)
There will always be an English description, but other languages may not exist - that is, there may be no entry in the table for that product and language. In this case, I want the table to show:
prodcode - description in l1 - description in l2
AAA Widget null
I tried the following SELECT statement, but it didn't return any rows.
(where $translang has the value of the second language, in this case Korean)Code MySQL:
I'm new to outer joins and also have never used subqueries or CASE, so any help would be appreciated.






Bookmarks