Nee doch nicht. Ich habe nach der "phpbb_topics.topic_title" DISTINCT und nach "post_id" sortiert. Nehme ich DISTINCT oder GROUP BY raus, funktioniert alles ohne Probleme, außer eben, dass die doppelten Einträge drin sind.
SQL:
SELECT phpbb_topics.topic_title,phpbb_topics.topic_views,phpbb_topics.topic_id,post_id FROM phpbb_topics INNER JOIN phpbb_posts ON phpbb_topics.topic_id=phpbb_posts.topic_id ORDER BY post_id DESC LIMIT 5
Ausgabe:
Thread 6,24,6,11
Thread 5,40,5,10
Thread 3,34,5,9
Thread 5,40,5,8
Thread 4,23,5,7
Thread 1,51,5,6
Da "Thread 5" zweimal drin ist, soll "Thread 5" nur einmal erscheinen und eben "Thread 1" nachrücken, da "Limit 5"! Wie muss ich das SELECT nun umbauen? Mit DISTINCT und GROUP BY funktioniert das nicht!