stats page fixes

svn path=/trunk/boinc/; revision=824
This commit is contained in:
David Anderson 2003-01-23 19:20:14 +00:00
parent 46f84c5bbf
commit 2468c13290
2 changed files with 5 additions and 3 deletions

View File

@ -75,7 +75,7 @@ function display_team_page($team) {
echo "</tr>";
$query = sprintf(
"select * from user where teamid = %d",
"select * from user where teamid = %d order by expavg_credit desc",
$team->id
);
$result = mysql_query($query);

View File

@ -25,12 +25,14 @@ function show_host_row($host) {
</tr>";
}
$max_hosts_display = 100;
db_init();
page_head("Top hosts");
$result = mysql_query("select * from host order by expavg_credit desc");
$result = mysql_query("select * from host order by expavg_credit desc limit $max_hosts_display");
host_table_start();
while ($host = mysql_fetch_object($result)) {
while (($host = mysql_fetch_object($result)) && $max_hosts_display > 0) {
show_host_row($host);
$max_hosts_display--;
}
mysql_free_result($result);
echo "</table>\n";