[Help] Ranking help

pkforfun

Member
Joined
Dec 11, 2016
Messages
59
Reaction score
4
Someone know where i`m wrong ? In top 5 characters show me only class ,dw,dk,elf...class lvl 2 don`t show in ranking...



$query = 'SELECT TOP 5 Name, Class, clevel,Resets from Character order by Resets desc ';
$result = mssql_query($query);
?>
<?
for($i=0;$i < mssql_num_rows($result);++$i)
{
$row = mssql_fetch_row($result);
$rank = $i+1;
if($row[1] == 0){ $row[1] = 'DW';
}
if($row[1] == 1){ $row[1] = 'SM';
}
if($row[1] == 16){ $row[1] = 'DK';
}
if($row[1] == 17){ $row[1] = 'BK';
}
if($row[1] == 32){ $row[1] = 'Elf';
}
if($row[1] == 33){ $row[1] = 'ME';
}
if($row[1] == 48){ $row[1] = 'MG';
}
echo "<tr>

<td valign=top align=left background=imagens/bg_menu2.gif font-size: 30px class=style1>$rank</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[0]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[1]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[2]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[3]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[4]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[5]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[6]</td>
</tr>";
}

?>
 

pkforfun

Member
Joined
Dec 11, 2016
Messages
59
Reaction score
4
Update:I`m wake up,problem fix.Good morning all ! :ROFLMAO:




$query = 'SELECT TOP 5 Name, Class, clevel,Resets from Character order by Resets,cLevel desc ';
$result = mssql_query($query);
?>
<?
for($i=0;$i < mssql_num_rows($result);++$i)
{
$row = mssql_fetch_row($result);
$rank = $i+1;
if($row[1] == 0){ $row[1] = 'DW';
}
if($row[1] == 1){ $row[1] = 'SM';
}
if($row[1] == 16){ $row[1] = 'DK';
}
if($row[1] == 17){ $row[1] = 'BK';
}
if($row[1] == 32){ $row[1] = 'Elf';
}
if($row[1] == 33){ $row[1] = 'ME';
}
if($row[1] == 48){ $row[1] = 'MG';
}
echo "<tr>

<td valign=top align=left background=imagens/bg_menu2.gif font-size: 30px class=style1>$rank</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[0]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[1]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[2]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[3]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[4]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[5]</td>
<td valign=top align=left background=imagens/bg_menu2.gif class=style1>$row[6]</td>
</tr>";
}

?>