Export a list of people who replied to a specific topic

Sometimes I need to mention a specific group of people who replied to a specific topic into a new one.
That’s because I’d like to involve them into a similar discussion
image

How can I do that quickly? Is there any particular query for that?

1 Like

Why don’t you simply post in the topic, with a link to your other topic, and interested people can see and follow that link? Mentioning 26 people by @username seems a bit extreme.

3 Likes

Becuase a mention triggers a notification while just linking a topic would be overlooked
By the way, generally I don’t have so many users and I don’t mention all the people but it’s useful to have the entire list.
I know it would be useful just for “community” purpose so I asked if there is a quick way using some clever query

1 Like

There is a badge query you can modify to make it work with Data Explorer plugin

6 Likes

looks cool but I don’t have “badge_posts” table.
How can I make it work?

1 Like

You don’t need that table because you really don’t want a badge. You want a list of users that replied to a specific topic.

Probably you need the table “users”, but I’m not a query expert…

2 Likes

Done :slight_smile: and I can download via CSV

SELECT u.username
FROM badge_posts p
JOIN topics t ON p.topic_id = t.id 
JOIN users u ON p.user_id  = u.id
WHERE t.id = '1010'
GROUP BY p.user_id,u.username
4 Likes

A little change to optimize that query (if you want to change the topic_id before execute it)

-- [params]
-- topic_id :topic_id = 18438
SELECT u.username
FROM badge_posts p
JOIN topics t ON p.topic_id = t.id 
JOIN users u ON p.user_id  = u.id
WHERE t.id = :topic_id
GROUP BY p.user_id,u.username 

Note: replace 18438 for some topic_id from your forum :blush:

7 Likes