GaijinPunch
MIS
I don't think a JOIN is the answer here. I'm moderate at best at MySQL.
Anyways, I've got two tables. An info table and a description table. The two tables share an ID column. The info table has no null values. The description table will have at least one description to correspond to an item in the info table... sometimes more. If there's only one description, it will be in English. If it has more, there's a chance it's in Japanese (denoted by a column).
My query is fine and dandy for English, but it doesn't work for Japanese. As before, there isn't always a Japanese description. If there's not, my last conditional will always fail (as you shall see). Here's the query when want to display a Japanese description:
I realize the problem is that if there's no Japnese description, WHERE dsc.langauge = "j" won't be true, and won't get the row... just not sure how I'd get around this (other than creating a seperate table for Japanese descriptions or doing some kung fu w/ PHP).
Thanks
Anyways, I've got two tables. An info table and a description table. The two tables share an ID column. The info table has no null values. The description table will have at least one description to correspond to an item in the info table... sometimes more. If there's only one description, it will be in English. If it has more, there's a chance it's in Japanese (denoted by a column).
My query is fine and dandy for English, but it doesn't work for Japanese. As before, there isn't always a Japanese description. If there's not, my last conditional will always fail (as you shall see). Here's the query when want to display a Japanese description:
Code:
SELECT title,developer,publisher,
IFNULL(gm_dsc.description, ' ') as description
FROM info
LEFT JOIN dsc ON info.id = dsc.id
WHERE dsc.language = "j"
AND gm_info.id = "100"
I realize the problem is that if there's no Japnese description, WHERE dsc.langauge = "j" won't be true, and won't get the row... just not sure how I'd get around this (other than creating a seperate table for Japanese descriptions or doing some kung fu w/ PHP).
Thanks