Who is the moron? Hey, stop pointing at me ... fixed mistake in SQL

git-svn-id: file:///svn/phpbb/trunk@681 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-07-16 21:20:03 +00:00
parent ddd401d276
commit 639a8067bd

View file

@ -185,15 +185,15 @@ if(!empty($HTTP_POST_VARS['postdays']) || !empty($HTTP_GET_VARS['postdays']))
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE t.forum_id = $forum_id WHERE t.forum_id = $forum_id
AND p.post_id = t.topic_last_post_id AND p.post_id = t.topic_last_post_id
AND p.post_time > $min_post_time AND ( p.post_time > $min_post_time
OR t.topic_type = " . POST_ANNOUNCE; OR t.topic_type = " . POST_ANNOUNCE . " )";
if(!$result = $db->sql_query($sql)) if(!$result = $db->sql_query($sql))
{ {
message_die(GENERAL_ERROR, "Couldn't obtain limited topics count information", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't obtain limited topics count information", "", __LINE__, __FILE__, $sql);
} }
list($topics_count) = $db->sql_fetchrow($result); list($topics_count) = $db->sql_fetchrow($result);
$limit_posts_time = "AND ( p.post_time > $min_post_time OR t.topic_type = " . POST_ANNOUNCE . " ) "; $limit_posts_time = "AND ( p.post_time > $min_post_time OR t.topic_type = " . POST_ANNOUNCE . " ) ";
if(!empty($HTTP_POST_VARS['postdays'])) if(!empty($HTTP_POST_VARS['postdays']))