I have the following tables:

languages
language_id int,
language_title varchar(80)

objects
object_id int
object_language_id int
object_title varchar(100)

I want to select ALL available languages, and match the translated object (if it is exists) for a specific object_id. If it does not exists for that specific language_id, I want to have NULL.

Because I'm using mysql 4.0, no subqueries allowed. Is there any way to rewrite the following?

SELECT
language_id,
language_title,
(SELECT object_title FROM objects WHERE object_id = ? AND object_language = l.id) AS object_title
FROM
languages l

Thanks!

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to