View Single Post
Old 15.07.2009, 14:22   #5
Marquis
Guest
 
Posts: n/a
Default [Request]Ladder/Player Ranking

if u get somebody that knows php he will do it... i don't know php... but i can give u the sql part...


top lvl


select top 10 lev,char_name from user_data where builder=0 and account_id!=-1 order by exp desc


top pk


select top 10 duel,char_name from user_data where builder=0 and account_id!=-1 order by duel desc


i think u got it...


I did not test it since i'm not deving, but it should work


//Connect to your mssql server

//Do your query : $res


echo '<table>';

echo '<tr><th>Rank</th><th>Name</th><th>Pk Count</th></tr>';

while ( $row = mssql_fetch_array ( $res ) ) {

$i++;

echo '<tr><td>'.$i.'</td><td>'.$row["char_name"].'</td><td>'.$row["duel"].'</td></tr>';

}

echo '</table>';

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-15-2009, 02:22 PM. Открыть источник.