Hello there,

I'm trying to display underneath each node a user has created something along the lines of...

"User has made 8 posts in Articles"

I have Aggregation on, and have the posts of a particular type being counted just fine.

My problem is when I use contextual filters to only display the posts by the node author only on the node being viewed.

SELECT node.uid AS node_uid, users_node.name AS users_node_name, users_node.uid AS users_node_uid, COUNT(node.nid) AS nid
FROM
{node} node
LEFT JOIN {users} users_node ON node.uid = users_node.uid
WHERE (( (node.type IN ('match_reports')) ))
GROUP BY node_uid, users_node_name, users_node_uid

I have tried using contextual filers on the content > User ID from url and various other similar combinations, but am obviously barking up the wrong tree.

If anyone could give me a pointer it would be greatly appreciated.

Comments

MustangGB’s picture

Status: Active » Closed (outdated)

Closing this as outdated to tidy up a bit around here. If you're still having problems with the latest release please create a new issue.