XenForo Help with SQL query to get who replied to a thread

S

superfadi1

Guest
Hi

The following SQL query will fetch who replied to any thread.

Code:

Code:
SELECT DISTINCT xf_post.user_id,
        xf_post.username, xf_user.user_group_id
        FROM xf_post, xf_user
        WHERE thread_id = ?
        AND xf_user.user_id = xf_post.user_id
        ORDER BY user_id ASC

I want to call it via simple callback (not addon)

Code:

<xf:callback class="\whoreplied\whoreplied" method="getHtml"></xf:callback>

The problem is how to get $thread_id automatically?

Can...


Read more

Continue reading...