Ejemplo n.º 1
0
			  on r.raid_id = d.distance_id 
		          left outer join Teams t
			  on t.distance_id = d.distance_id
			     and t.team_hide = 0 
		             and  COALESCE(t.team_outofrange, 0) = 0
		             and  COALESCE(t.team_result, 0) > 0
                          left outer join TeamUsers tu
			  on t.team_id = tu.team_id			   
		          left outer join Users u
			  on u.user_id = tu.user_id
		    where d.distance_hide = 0 
		    ) b
		    on a.user_id = b.user_id
*/
//echo 'sql '.$sql;
CMmbLogger::addRecord('rank query: ');
$Result = MySqlQuery($sql);
if ($ShowAllRaids) {
    $sqlRaids = "select r.raid_id, r.raid_name, d.distance_name, d.distance_id from Raids r\n\t\t\t        inner join Distances d on r.raid_id = d.raid_id and d.distance_hide = 0\n\t\t                order by r.raid_id  desc, d.distance_id desc ";
    $ResultRaids = MySqlQuery($sqlRaids);
    $RowCount = mysql_num_rows($ResultRaids);
    $TableWidth = $RowCount * 100 + 550;
    $ctp = microtime(true);
    $teamPlaces = new CTeamPlaces();
    CMmbLogger::addInterval('team-places', $ctp);
} else {
    $TableWidth = 550;
}
$t5 = microtime(true);
print '<table class="std" width="' . $TableWidth . '" >' . "\r\n";
print '<tr class="gray head">