What i need to do is select the comment details and the last action taken on the comment; I have 3 tables:
Comment
CommentID, commentText, userID, date_posted
Action
ActionID, action_taken,userID,date_actioned
and CommentJoinAction
id,ActionID,CommentID
There can be one comment, but many actions on the comment.
my SQL is looking something like:
Select /*snip comment details and such*/
From Comment
Inner Join (select max(actionid) from commentjoinaction) as cja on /*blah cause you know from reading this, it won't work*/
So what is it that I can do so that I always pick up the latest commentAction for the comments.
many thanks
Is this what you are looking for?