Quote:
Originally Posted by karnyge
Dumb question here folks lol
How do i get the 'Top Players' list on a website to indicate the players by pot, rather than experience, (or whatever it uses).
I am not asking for myself because i know nothing about webpage design. I ask because i have yet to see anything on this site resembling this particular query and thought some people would like to know.
|
Well, you need a a source saying that this person have this much Potency, Then you can make an page for it to display, Example is provided below.
Code:
<?php
mysql_select_db($mydb);
$rank = mysql_query("SELECT name,level,profession,[COLOR="Lime"]power[/COLOR] FROM cq_user WHERE name NOT LIKE '%[PM]%' AND name NOT LIKE '%[GM]%' ORDER by [COLOR="Lime"]power[/COLOR] desc limit 50;");
$i=1;
while($row = mysql_fetch_array($rank)){
if($row['profession']==10){
$profesion='Mage';
}
if($row['profession']==30){
$profesion='Paladin';
}
if($row['profession']==20){
$profesion='Warrior';
}
echo '
<td>'.$i.'-</td>
<td><div align="center">'.$row['name'].'</td>
<td><div align="center">'.$profesion.'</td>
<td><div align="center">'.$row['[COLOR="Lime"]power[/COLOR]'].'</td>
<td><div align="center">'.$row['level'].'</td>
</tr> ';
$i=$i+1;
}
?>
I used power in cq_user. Replace the Green Color word to the Potency source.