I want to list a user's comments. The user is given by the url. The problem is that it shows me comments from other users.
Here's my setup and views Query:
http://i52.tinypic.com/2rrrnnp.jpg
SELECT node_comment.title AS node_comment_title, node_comment.nid AS node_comment_nid, node_comment__comment.subject AS node_comment__comment_subject, node_comment__comment.cid AS node_comment__comment_cid, node_comment__comment.nid AS node_comment__comment_nid
FROM
{comment} comment
INNER JOIN {users} users_comment ON comment.uid = users_comment.uid
INNER JOIN {node} node_comment ON comment.nid = node_comment.nid
LEFT JOIN {comment} node_comment__comment ON node_comment.nid = node_comment__comment.nid
WHERE (( (users_comment.uid = '1') ))
LIMIT 10 OFFSET 0
Comments
Comment #1
Alcaparra commentedThis is the view:
Comment #2
merlinofchaos commentedIt's the second field. It's on the node relationship when it should be on no relationship. Bedcause it's attached to the node relationship, it's bringing all comments through an extra join that you don't want.