Unread Post Information to Database
Verfasst: 27.05.2003 22:49
ich hab diesen mod eingebaut und bekomme eine fehlermeldung, wenn ich in ein forum will..
das ist die betreffende stelle (endet mit linie 405)
was hab ich falsch?
Code: Alles auswählen
Could not obtain topic information
DEBUG MODE
SQL Error : 1109 Unknown table 'p2' in field list
SELECT t.*, 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, p2.post_edit_time FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_users u2 WHERE t.forum_id = 5 AND t.topic_poster = u.user_id AND p.post_id = t.topic_last_post_id AND p.poster_id = u2.user_id AND t.topic_type = 2 AND t.topic_type <> 3 ORDER BY t.topic_last_post_id DESC
Line : 404
File : /homepages/XX/XXXXXXXX/htdocs/XXXXXXXXX/phpBB2/viewforum.php
Code: Alles auswählen
$sql = "SELECT t.*, 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, p2.post_edit_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id
AND t.topic_type = " . POST_ANNOUNCE . "
AND t.topic_type <> " . POST_GLOBAL_ANNOUNCE . "
ORDER BY t.topic_last_post_id DESC ";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}