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 に答える