I have the following SQL Query wich selects a result from 3 tables 'work', 'media' and 'work_media'
I want all the work with 1 of its associated media, the following SQL query does that. But it only return the work that actually has media linked with it and thats's not what I want, I also want the work returned that has no media attached to it. How can I accomplisch that?
SELECT work
.id
, work
.title
, work
.file_name_thumb
FROM work
, media
, media_work
WHERE media_work
.work_id
= work.id
AND media_work
.media_id
= media.id
GROUP BY work
.id
ORDER BY work
.id
DESC