From 8df44a7e30de46052645ed5cf5ca194b4ae46bf8 Mon Sep 17 00:00:00 2001 From: "Eric J. Korpela" Date: Tue, 12 Jun 2007 16:04:19 +0000 Subject: [PATCH] Fixed top hosts query to use index on sorting column. svn path=/trunk/boinc/; revision=12906 --- html/user/top_hosts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/user/top_hosts.php b/html/user/top_hosts.php index c143c228d3..5dff70740e 100644 --- a/html/user/top_hosts.php +++ b/html/user/top_hosts.php @@ -35,7 +35,7 @@ if ($sort_by == "total_credit") { } else { $sort_clause = "expavg_credit desc"; } -$result = mysql_query("select * from host where total_credit>300 order by $sort_clause limit $offset,$n"); +$result = mysql_query("select * from host where $sort_by>0 and total_credit>300 order by $sort_clause limit $offset,$n"); top_host_table_start($sort_by); $i = $offset+1; while ($host = mysql_fetch_object($result)) {