我有一个旧论坛。在这个论坛上有很多双主题(同名)。我找到了所有具有此选择的双主题标题:
SELECT topic_title, topic_time, forum_id, topic_first_post_id, topic_first_poster_name, topic_id, topic_poster, COUNT( * ) TotalCount
FROM phpbb3_topics
GROUP BY topic_title
HAVING COUNT( * ) >1
现在我想要来自同一个人topic_poster
topic_poster ID
的所有双主题标题(topic_poster是ID字段)
非常感谢
答案 0 :(得分:0)
您可以通过以下方式将topic_poster
添加到您的论坛:
SELECT topic_title, topic_time, forum_id, topic_first_post_id, topic_first_poster_name, topic_id, topic_poster, COUNT( * ) TotalCount
FROM phpbb3_topics
GROUP BY topic_title, topic_poster
HAVING COUNT( * ) >1
答案 1 :(得分:0)
试试这个:
SELECT topic_poster_id, topic_title, topic_time, forum_id, topic_first_post_id, topic_first_poster_name, topic_id, topic_poster, COUNT( * ) TotalCount
FROM phpbb3_topics
GROUP BY topic_poster_id, topic_title
HAVING COUNT( * ) >1