Digeratimvp
Just a little mistake with the table, the column was without the prefix:
SELECT DISTINCT p.user_id
FROM fldp_posts AS p
JOIN fldp_discussions AS d ON p.discussion_id = d.id
WHERE d.id = 611671 AND p.user_id != d.user_id
ORDER BY RAND()
LIMIT 1;
That should work.
Follow @luceos 1st post instructions