First thing I would try off the top of my head (UNTESTED!) would be
Code:
SELECT W.id, IF( SL.id IS NULL, W.word, SL.word ) AS TheWord
FROM words AS W
LEFT JOIN ( SELECT id, language, word FROM words WHERE language = 'sl' ) AS SL
ON W.id = SL.id
WHERE W.id IN ( 1, 2 )
Again, untested (I don't have MYSQL on this machine...don't ask why not), but feels right.
SELECT W.id, IF( SL.id IS NULL, W.word, SL.word ) AS TheWord
FROM words AS W
LEFT JOIN ( SELECT id, language, word FROM words WHERE language = 'sl' ) AS SL
ON W.id = SL.id
WHERE W.language = 'en'
PS
Lately I 'm writing qustions that nobody knows the answer, or ..... are fun (-:
Glad that there are people outthere finding my questions interesting.
Last edited by BubikolRamios; 02-17-2009 at 05:39 AM..