Problem mit Recent.php
Verfasst: 07.05.2006 18:59
Bei mir erscheint : "SQL Error : 1054 Unknown column 't.topic_first_post_id' in 'on clause'"
Was mache ich falsch?
Was mache ich falsch?
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Hast du das Datenbank Update erledigt?Kiste7 hat geschrieben:Bei mir erscheint : "SQL Error : 1054 Unknown column 't.topic_first_post_id' in 'on clause'"
Was mache ich falsch?
Code: Alles auswählen
could not obtain main information.
DEBUG MODE
SQL Error : 1054 Unknown column 't.topic_first_post_id' in 'on clause'
SELECT t.*, p.poster_id, p.post_username AS last_poster_name, p.post_id, p.post_time, f.forum_name, f.forum_id, u.username AS last_poster, u.user_id AS last_poster_id, u2.username AS first_poster, u2.user_id AS first_poster_id, p2.post_username AS first_poster_name FROM roum_topics t, roum_posts p LEFT OUTER JOIN roum_posts p2 ON p2.post_id = t.topic_first_post_id LEFT OUTER JOIN roum_forums f ON p.forum_id = f.forum_id LEFT OUTER JOIN roum_users u ON p.poster_id = u.user_id LEFT OUTER JOIN roum_users u2 ON u2.user_id = t.topic_poster WHERE t.forum_id NOT IN ('start') AND p.post_id = t.topic_last_post_id AND FROM_UNIXTIME(p.post_time,'%Y%m%d') - FROM_UNIXTIME(unix_timestamp(NOW()),'%Y%m%d') = 0 ORDER BY t.topic_last_post_id DESC LIMIT 0, 10
Line : 127
File : recent.php
Code: Alles auswählen
#
#-----[ ÖFFNEN ]---------------------------
#
# recent.php
#
#-----[ FINDE ]---------------------------------------------------
#
$where_forums = ( $special_forums == '0' ) ? 't.forum_id NOT IN ('. $except_forums .')' : 't.forum_id NOT IN ('. $except_forums .') AND t.forum_id IN ('. $forum_ids .')';
$sql_start = "SELECT t.*, p.poster_id, p.post_username AS last_poster_name, p.post_id, p.post_time, f.forum_name, f.forum_id, u.username AS last_poster, u.user_id AS last_poster_id, u2.username AS first_poster, u2.user_id AS first_poster_id, p2.post_username AS first_poster_name
FROM ". TOPICS_TABLE ." t, ". POSTS_TABLE ." p
LEFT OUTER JOIN ". POSTS_TABLE ." p2 ON p2.post_id = t.topic_first_post_id
LEFT OUTER JOIN ". FORUMS_TABLE ." f ON p.forum_id = f.forum_id
LEFT OUTER JOIN ". USERS_TABLE ." u ON p.poster_id = u.user_id
LEFT OUTER JOIN ". USERS_TABLE ." u2 ON u2.user_id = t.topic_poster
WHERE $where_forums AND p.post_id = t.topic_last_post_id AND ";
$sql_end = " ORDER BY t.topic_last_post_id DESC LIMIT $start, $topic_limit";
#
#-----[ Ersetze mit ]------------------------------------------
#
$where_forums = ( $special_forums == '0' ) ? 't.forum_id NOT IN ('. $except_forums .')' : 't.forum_id NOT IN ('. $except_forums .') AND t.forum_id IN ('. $forum_ids .')';
$sql_start = "SELECT t.*, p.poster_id, p.post_username AS last_poster_name, p.post_id, p.post_time, f.forum_name, f.forum_id, u.username AS last_poster, u.user_id AS last_poster_id, u2.username AS first_poster, u2.user_id AS first_poster_id, p2.post_username AS first_poster_name
FROM (". TOPICS_TABLE ." t, ". POSTS_TABLE ." p)
LEFT OUTER JOIN ". POSTS_TABLE ." p2 ON p2.post_id = t.topic_first_post_id
LEFT OUTER JOIN ". FORUMS_TABLE ." f ON p.forum_id = f.forum_id
LEFT OUTER JOIN ". USERS_TABLE ." u ON p.poster_id = u.user_id
LEFT OUTER JOIN ". USERS_TABLE ." u2 ON u2.user_id = t.topic_poster
WHERE $where_forums AND p.post_id = t.topic_last_post_id AND ";
$sql_end = " ORDER BY t.topic_last_post_id DESC LIMIT $start, $topic_limit";
Code: Alles auswählen
FROM (". TOPICS_TABLE ." t, ". POSTS_TABLE ." p)