Owner Total credit Recent average credit CPU type EOT; } function show_host_row($host) { $result = mysql_query("select * from user where id = $host->userid"); $user = mysql_fetch_object($result); mysql_free_result($result); echo " id>$user->name $host->total_credit $host->expavg_credit $host->p_vendor $host->p_model "; } db_init(); page_head("Top hosts"); $result = mysql_query("select * from host order by expavg_credit desc"); host_table_start(); while ($host = mysql_fetch_object($result)) { show_host_row($host); } mysql_free_result($result); echo "\n"; page_tail(); ?>