aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-05-17 11:24:34 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-05-17 11:24:34 +0000
commit6a1591f2be15dd6c5e8dae036bd77e7a86b50ae2 (patch)
tree2b528182556aec162462cdf3a3d6b3b56476a2ed
parent68e374067b527ba8b670d53e5879112cf7f67872 (diff)
downloadforums-6a1591f2be15dd6c5e8dae036bd77e7a86b50ae2.tar
forums-6a1591f2be15dd6c5e8dae036bd77e7a86b50ae2.tar.gz
forums-6a1591f2be15dd6c5e8dae036bd77e7a86b50ae2.tar.bz2
forums-6a1591f2be15dd6c5e8dae036bd77e7a86b50ae2.tar.xz
forums-6a1591f2be15dd6c5e8dae036bd77e7a86b50ae2.zip
- Significant speed increase, MySQL can't ORDER BY arbitrary statements anyway
git-svn-id: file:///svn/phpbb/trunk@5919 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/ucp/ucp_main.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index 59f95936d8..716f459316 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -817,8 +817,7 @@ class ucp_main
WHERE p.poster_id = ' . $user->data['user_id'] . "
AND f.forum_id = p.forum_id
$post_count_sql
- GROUP BY f.forum_id
- ORDER BY COUNT(p.post_id) DESC";
+ GROUP BY f.forum_id";
$result = $db->sql_query_limit($sql, 1);
$active_f_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -837,8 +836,7 @@ class ucp_main
AND t.topic_id = p.topic_id
AND f.forum_id = t.forum_id
$post_count_sql
- GROUP BY t.topic_id
- ORDER BY COUNT(p.post_id) DESC";
+ GROUP BY t.topic_id";
$result = $db->sql_query_limit($sql, 1);
$active_t_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);