Looks like this may be more complicated than I want...
Here is what I want to do...
My website has Articles.
Beneath a given Article, Members can post Comments.
And for each Comment, other Members can rate a given Comment on a mini-Form below the Comment.
I have all of this working, but now I want to hide the Comment-Survey Form on Comments for which the logged-in Member has already voted. (Just a visual queue as to which Comments they have or have not reviewed.)
In my "ARTICLE_COMMENT_REVIEW" table, I have a "created_on" field which when populated means a given Comment was rated.
So, if I could add the "ARTICLE_COMMENT_REVIEW" table my current query which populates the Comments section beneath an Article, then that extra piece of information should give my PHP what it needs to show/hide the Comment Form.
Follow me so far?
So I need to join "ARTICLE_COMMENT_REVIEW" to this abridged query...
SELECT m.id AS member_id, m.username, an so on...
ac.id AS comment_id, ac.created_on, ac.comment_no, ac.body
FROM member AS m
INNER JOIN article_comment AS ac
ON m.id = ac.member_id
The problem is that the simplified test query in my OP wasn't returning any records, and the more that I think about it, I am not sure how to do an Inner Join where the Parent Table has a Composite Key and the Child Table also has a Composite Key?!
Does that make sense??