您不应该在子查询中包括
COUNT(p.post_id) AS total_posts在
SELECt列表中。只是
SELECT topic_id FROM phpbb_topics AS tWHERe t.topic_id IN ( SELECt p.topic_id --, COUNT(p.post_id) AS total_posts FROM phpbb_posts AS p WHERe p.poster_id = 61640 GROUP BY p.topic_id HAVINg t.topic_replies_real = COUNT(p.post_id) - 1);


![操作数应包含1列[重复] 操作数应包含1列[重复]](http://www.mshxw.com/aiimages/31/647501.png)
