Und zwar will ich nicht nur den Titel, User, Datum usw auslesen, sondern auch den post_text des Topics-Eröffner´s.
Wie muss ich die vorhandene SQL Anweisung abändern um das zu realisieren?
PHP und SQL Kenntnisse sind zwar da, aber das Ding hier is schon ne Nr zu dick für mich.
Code: Alles auswählen
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM ". TOPICS_TABLE ." t, ". FORUMS_TABLE ." f, ". USERS_TABLE ." u, ". POSTS_TABLE ." p, ". POSTS_TABLE ." p2, ". USERS_TABLE ." u2
WHERE $where_part1
AND t.topic_poster = u.user_id
AND f.forum_id = t.forum_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
ORDER BY t.topic_last_post_id DESC LIMIT $limit";