Fixed top hosts query to use index on sorting column.

svn path=/trunk/boinc/; revision=12906
This commit is contained in:
Eric J. Korpela 2007-06-12 16:04:19 +00:00
parent 9cecd6905c
commit 8df44a7e30
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {