1SELECT
2 comments.*, users.company, users.contact_person, users.email
3 FROM
4 comments
5 LEFT JOIN users ON users.user_id = comments.user_id
6 WHERE
7 comment_id = %s
8UNION ALL
9SELECT activity.*, users.company, users.contact_person, users.email
10 FROM
11 activity
12 LEFT JOIN users ON users.user_id = activity.user_id
13 WHERE
14 comment_id = %s
15ORDER BY
16 timestamp ASC
17