0

我有一个旧论坛。在这个论坛中有许多双重主题(相同的标题)。我发现所有具有此选择的双主题标题:

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 字段)

非常感谢

4

2 回答 2

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
于 2013-08-20T11:38:22.367 回答
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
于 2013-08-20T11:41:05.617 回答