I\'ve got a user table and a complaint table.
user
complaint
The complaint table has the following structure:
[opened_by] [
SELECT complaint.complaint_text, A.username, B.username FROM complaint LEFT JOIN user A ON A.user_id=complaint.opened_by LEFT JOIN user B ON B.user_id=complaint.closed_by