- Joined
- Nov 13, 2008
- Messages
- 1,367
- Reaction score
- 509
Класация за изпълнен Quest
Credits : oveRLuckEd
Code:
<?php
$config['host'] = "localhost";
$config['user'] = "sa";
$config['pass'] = "";
$config['base'] = "MuOnline";
mssql_connect($config['host'], $config['user'], $config['pass']);
mssql_select_db($config['base']);
echo "
<table border=\"1\" width=\"500\">
<tr>
<td>#</td>
<td>Name</td>
<td>Finished Quests</td>
<td>Finishing a quest</td>
<td>Reset</td>
<td>Level</td>
</tr>
";
$query = mssql_query("SELECT TOP 20 Name, cLevel, Resets, QuestNumber, QuestMonsters, QuestInCurse FROM Character WHERE QuestNumber>0 ORDER BY QuestNumber-QuestInCurse desc") or die(mssql_get_last_message());
while($row = mssql_fetch_array($query)) {
$i++;
$fq = $row['QuestNumber'] - $row['QuestInCurse'];
if($row['QuestInCurse'] == 1) {
$qc = "Yes";
}
else {
$qc = "No";
}
echo "
<tr>
<td>$i</td>
<td>".$row['Name']."</td>
<td>".$fq."</td>
<td>".$qc."</td>
<td>".$row['Resets']."</td>
<td>".$row['cLevel']."</td>
</tr>
";
}
echo "</table>";
?>
Credits : oveRLuckEd
Last edited: