aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-03-02 01:26:55 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-03-02 01:26:55 +0000
commit4b809856ace755fadc639b2df6b6d52637cf10e1 (patch)
treea5e1f1e48439e7db65ca8d4e34233589e4d8e78b /phpBB
parentbed1036f6c16af6850bc1c09aa4df53ce173d02c (diff)
downloadforums-4b809856ace755fadc639b2df6b6d52637cf10e1.tar
forums-4b809856ace755fadc639b2df6b6d52637cf10e1.tar.gz
forums-4b809856ace755fadc639b2df6b6d52637cf10e1.tar.bz2
forums-4b809856ace755fadc639b2df6b6d52637cf10e1.tar.xz
forums-4b809856ace755fadc639b2df6b6d52637cf10e1.zip
Preliminary MSSQL compability updates
git-svn-id: file:///svn/phpbb/trunk@70 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/index.php3
-rw-r--r--phpBB/viewforum.php8
2 files changed, 3 insertions, 8 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index f50f727f0d..8cfffd9c3f 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -46,7 +46,7 @@ $template->set_block("catrow", "forumrow", "forums");
$sql = "SELECT c.*
FROM ".CATEGORIES_TABLE." c, ".FORUMS_TABLE." f
WHERE f.cat_id=c.cat_id
- GROUP BY c.cat_id
+ GROUP BY c.cat_id, c.cat_title, c.cat_order
ORDER BY c.cat_order";
if(!$q_categories = $db->sql_query($sql))
{
@@ -106,6 +106,7 @@ if($total_categories)
$created_line = false;
for($j = 0; $j < $total_forums; $j++)
{
+
if( ( $forum_rows[$j]["cat_id"] == $category_rows[$i]["cat_id"] && $viewcat == -1 ) ||
( $category_rows[$i]["cat_id"] == $viewcat) )
{
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 9f39b64ff7..111502c7df 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -70,13 +70,7 @@ if(!isset($start))
$start = 0;
}
-$sql = "SELECT t.*, u.username, p.post_time
- FROM " . TOPICS_TABLE ." t, ". USERS_TABLE. " u
- LEFT JOIN ".POSTS_TABLE." p ON p.post_id = t.topic_last_post_id
- WHERE t.forum_id = '$forum_id'
- AND t.topic_poster = u.user_id
- ORDER BY topic_time DESC
- LIMIT $start, $topics_per_page";
+$sql = "SELECT t.*, u.username, p.post_time FROM " . TOPICS_TABLE ." t JOIN ". USERS_TABLE. " u ON t.topic_poster = u.user_id LEFT JOIN ".POSTS_TABLE." p ON p.post_id = t.topic_last_post_id WHERE t.forum_id = '$forum_id' ORDER BY topic_time DESC LIMIT $start, $topics_per_page";
if(!$t_result = $db->sql_query($sql))
{
error_die($db, QUERY_ERROR);