Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Show The Best Player In menu.tpl

Banned
Banned
Joined
Sep 17, 2011
Messages
71
Reaction score
1
Show The Best Player In menu.tpl, hi i want show the best player in the rank of statistiken, but i dont know the code, i have this code for show the last user:

<p><a><b><font color='grey'>Last User:</font><font color='red'><?php $lastUser = mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users ORDER BY id DESC LIMIT 1")); echo $lastUser['username']; ?></font></b></a></p>

but i nedd the code for the best player in the rank , the number 1, Dzoki please help me!!!

i have the table called "users" and i have the rows "id" , "username" and "oldrank" in the oldrank rows show the position of the best and fail player, the best logical is the number one, but i need show the name of the best player, is for motivation of the players!!!:lol:

I try this code but only show me the number " 0 " of the list:
<p><a><b><font color='grey'>Best Player:</font><font color='lime'><?php $oldrank = mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users ORDER BY id ASC LIMIT 1")); echo $oldrank['username']; ?></font></b></a></p>


Thanks!!
 
Newbie Spellweaver
Joined
Nov 18, 2015
Messages
31
Reaction score
4
<p><a><b><font color='grey'>Best Player:</font><font color='lime'><?php $oldrank = mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users ORDER BY id ASC LIMIT 1")); echo $oldrank['username']; ?></font></b></a></p>

Code:
<p><a><b><font color='grey'>Best  Player:</font><font color='lime'><?php $oldrank =  mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users ORDER  BY id oldrank LIMIT 1")); echo $oldrank['username'];  ?></font></b></a></p>
 
Upvote 0
Banned
Banned
Joined
Sep 17, 2011
Messages
71
Reaction score
1
Code:
<p><a><b><font color='grey'>Best  Player:</font><font color='lime'><?php $oldrank =  mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users ORDER  BY id oldrank LIMIT 1")); echo $oldrank['username'];  ?></font></b></a></p>

Hi thanks for reply my post, i want put the best player in the menu.tpl but i cant i had this code but dont work, somebody here can HELP ME!!

TY Best regards by Tutu.
 
Upvote 0
Newbie Spellweaver
Joined
Nov 18, 2015
Messages
31
Reaction score
4
why then you run a server if you can't make things like that? i mean you don't know how to code, why run a server then? there is tons of things you need to code before release server...
 
Upvote 0
Skilled Illusionist
Joined
Sep 5, 2011
Messages
360
Reaction score
14
Show The Best Player In menu.tpl, hi i want show the best player in the rank of statistiken, but i dont know the code, i have this code for show the last user:

<p><a><b><font color='grey'>Last User:</font><font color='red'><?php $lastUser = mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users ORDER BY id DESC LIMIT 1")); echo $lastUser['username']; ?></font></b></a></p>

but i nedd the code for the best player in the rank , the number 1, Dzoki please help me!!!

i have the table called "users" and i have the rows "id" , "username" and "oldrank" in the oldrank rows show the position of the best and fail player, the best logical is the number one, but i need show the name of the best player, is for motivation of the players!!!:lol:

I try this code but only show me the number " 0 " of the list:
<p><a><b><font color='grey'>Best Player:</font><font color='lime'><?php $oldrank = mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users ORDER BY id ASC LIMIT 1")); echo $oldrank['username']; ?></font></b></a></p>


Thanks!!

<p><a><b><font color='grey'>Best Player:</font><font color='lime'><?php $oldrank = mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users WHERE tribe < 4 ORDER BY oldrank LIMIT 1")); echo $oldrank['username']; ?></font></b></a></p>
 
Upvote 0
Skilled Illusionist
Joined
Jun 24, 2010
Messages
351
Reaction score
360
hi, try this
PHP:
$top_rank = mysql_fetch_assoc(mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE access< 8 AND id > 5 AND tribe<=3 AND tribe > 0 ORDER BY oldrank ASC Limit 1")); echo $top_rank['username'];
 
Last edited:
Upvote 0
Banned
Banned
Joined
Sep 17, 2011
Messages
71
Reaction score
1
<p><a><b><font color='grey'>Best Player:</font><font color='lime'><?php $oldrank = mysql_fetch_assoc(mysql_query("SELECT * FROM ". TB_PREFIX . "users WHERE tribe < 4 ORDER BY oldrank LIMIT 1")); echo $oldrank['username']; ?></font></b></a></p>

Hi thanks for your reply but dont work, please somebody can help me!!! =)
 
Upvote 0
Back
Top