echo " ";
gui_header_under("Tip13 2008 statistik", "Tip13 2008 statistics", 95);
echo " ";
if (!$species_id = @$_GET['species_id']) { $species_id = '';}
// tipcategory.category_point_a, tipcategory.category_point_b
$sql_tip13_competitors = "Select profile.first_name, profile.middel_name, profile.last_name, tiplist.profile_id, COUNT(*) As number_of_tip_species, SUM(tipcategory.category_point_a) As number_of_category_point_a, SUM(tipcategory.category_point_b) As number_of_category_point_b, tip13_user_list.total_point, birdlist." . $page_language . "_name As bird_name, tip13_user_list.updated_date From tbl_tip13_2008_list AS tiplist, tbl_tip13_2008_arter_category As tipcategory, tbl_tip13_2008_arter As tipspecies, tbl_profiles As profile, tbl_tip13_2008_user_list As tip13_user_list, tbl_bird_species As birdlist Where tipspecies.species_id = tiplist.species_id AND tipspecies.id_category = tipcategory.id_category AND tiplist.profile_id = profile.profile_id AND tiplist.profile_id = tip13_user_list.profile_id AND tipspecies.species_id = " . $species_id . " AND tipspecies.species_id = birdlist.species_id Group by tiplist.profile_id Order By tip13_user_list.total_point Desc, profile.last_name, profile.first_name";
$db->query($sql_tip13_competitors, "tip13_competitors");
$row2 = $db->row("tip13_competitors");
$bird_name = $row2['bird_name'];
$db->db_data_seek("tip13_competitors",0);
echo "Konkurrence deltagere som har tippet på " . $bird_name . " ";
echo " ";
echo "";
if($page_language == 'dk') {
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo " ";
} else {
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo " ";
}
$tip_point_a = 0;
$tip_point_b = 0;
$rowNumber = 0;
//Gennemloeber Recordset
While ($row2 = $db->row("tip13_competitors")) {
$rowNumber++;
$full_name = $row2["first_name"];
$full_name .= ($row2["middel_name"] != '') ? " " . $row2["middel_name"] : "";
$full_name .= ($row2["last_name"] != '') ? " " . $row2["last_name"] : "";
$listcell_class = 'listcell';
echo "";
echo "";
echo $rowNumber;
echo " | ";
echo "";
echo "" . $full_name . "";
echo " | ";
echo "";
echo "(" . $row2["number_of_category_point_a"] . "/" . $row2["number_of_category_point_b"] . ")";
echo " | ";
echo "";
echo "" . $row2["total_point"] . "";
echo " | ";
echo "";
if(!is_null($row2["updated_date"])) {
echo date('d-m-Y', strtotime($row2["updated_date"]));
} else {
echo " ";
}
echo " | ";
echo " ";
}
echo " ";
echo " ";
?>
|