Unreported: SQL Error for guests, displaying global announcements (Unknown column 't.forum_id' in 'where clause' - SELECT forum_id FROM phpbb_forums WHERE forum_type = 1 AND (t.forum_id = 0 OR (t.forum_id <> 3)) ORDER BY forum_id LIMIT 1), need to get the TOPICS_TABLE into the check too

This commit is contained in:
Kevin
2008-04-21 10:55:20 +00:00
parent 0768e945b6
commit 7bd09f6c52

View File

@@ -151,14 +151,13 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le
if( $type == 'announcements' && $global_f < 1 )
{
$sql = 'SELECT
forum_id
FROM
' . FORUMS_TABLE . '
f.forum_id
FROM ' . FORUMS_TABLE . ' f, ' . TOPICS_TABLE . ' t
WHERE
forum_type = ' . FORUM_POST . '
f.forum_type = ' . FORUM_POST . '
' . $str_where . '
ORDER BY
forum_id';
f.forum_id';
$result = $db->sql_query_limit($sql, 1);
if ($db->sql_affectedrows() > 0)