No luck, here's the query I'm using...
Code:
SELECTtbl_subtask.id, tbl_subtask.name, tbl_attachment.attachment
FROM tbl_task
LEFT JOIN tbl_attachment ON tbl_attachment.subtask_id = tbl_subtask.id
AND tbl_attachment.id = (
SELECT max( id )
FROM tbl_attachment
WHERE tbl_attachment.subtask_id = tbl_subtask.id )
and I get the following error ...
Code:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select max(id)
from tbl_attachment
where