SELECT d.id, d.author_id, d.msg, d.added_time, u.name AS author_name
FROM discussion_messages AS d, people AS u
WHERE u.id=d.author_id AND d.discussion_id=?
SELECT d.id, d.author_id, d.msg, d.added_time, u.name AS author_name
FROM discussion_messages d
LEFT JOIN people u ON u.id=d.author_id
WHERE d.discussion_id=?