SELECT
(SELECT date FROM forums WHERE topic_id=f.id OR id=f.id ORDER BY id DESC LIMIT 1) as last_reply,
f.*, p.id as pid, p.name FROM forums f
INNER JOIN players p ON p.id = f.author
WHERE f.topic_id=0 ORDER BY f.id DESC
在子查询中,我不仅要返回date
字段,还要返回author
字段。我怎样才能做到这一点?
看了一个类似的帖子,但无法将其应用于我的帖子。