Ok i downloaded a register/top players website source by scottdavey
It Shows the Top player for different thing, How would i go about adding the Top 3 or top 30 etc?
I'm not very good with PHP so i have no idea about this, i had a little mess around with it yesterday but anything i tried stopped it displaying anything.
I honestly don't know much about PHP, but it's ussually as simple as just reading to figure out what you need to change. I'll add the top players to my site and see if I can figure it out, I think I already have an idea of what it is. So I may be back editting this post, or making a new one in a few minutes.
Edit: Ok, well I tested it, but my idea didn't seem to work. However, the top players doesn't seem to gather information correctly, so... That's something else that would need to be worked on.
I honestly don't know much about PHP, but it's ussually as simple as just reading to figure out what you need to change. I'll add the top players to my site and see if I can figure it out, I think I already have an idea of what it is. So I may be back editting this post, or making a new one in a few minutes.
Edit: Ok, well I tested it, but my idea didn't seem to work. However, the top players doesn't seem to gather information correctly, so... That's something else that would need to be worked on.
yeah it needed a bit of editting
Code:
$res = mysql_query("SELECT CharName FROM characters ORDER BY Level DESC ;");
$res2 = mysql_query("SELECT Level FROM characters ORDER BY [U]Level[/U] DESC ;");
Underlined was edit made by me to make it right
and
Code:
$res = mysql_query("SELECT CharName FROM characters ORDER BY CPs DESC ;");
$res2 = mysql_query("SELECT CPs FROM characters ORDER BY [U]CPs[/U] DESC ;");
underlined editted here too.
Just need to get the next rows or something i dont know
$res = mysql_query("SELECT CharName FROM characters ORDER BY CPs DESC ;");
$res2 = mysql_query("SELECT CPs FROM characters ORDER BY CPs DESC ;");
Doesn't it have like,
Code:
LIMIT x
so something like...
Code:
$res = mysql_query("SELECT CharName FROM characters ORDER BY CPs DESC LIMIT 10;");
$res2 = mysql_query("SELECT CPs FROM characters ORDER BY CPs DESC LIMIT 10;");
$res = mysql_query("SELECT CharName FROM characters ORDER BY Level DESC ;");
$res2 = mysql_query("SELECT Level FROM characters ORDER BY [U]Level[/U] DESC ;");
Underlined was edit made by me to make it right
and
Code:
$res = mysql_query("SELECT CharName FROM characters ORDER BY CPs DESC ;");
$res2 = mysql_query("SELECT CPs FROM characters ORDER BY [U]CPs[/U] DESC ;");
underlined editted here too.
Just need to get the next rows or something i dont know
Ah, ok, didn't think of that, saw it, and was like huh... how does that make sense, lol, but didn't think to change it. Anyway, taking a break from quest making for a few, so I'll take a look at this again and see if I can find a way to make it work...
Here's an example, using my query with an added inner query to remove the high level accounts that are GMs. Of course, you will need to modify it to make it prettier as right now it only prints the data plainly. Hopefully you get the idea.
PHP Code:
<?php
$con = mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("coproj");
$query = mysql_real_escape_string("SELECT `CharName`,`Level` FROM `characters` WHERE `Job` BETWEEN 10 AND 15 AND `Account` NOT IN(SELECT `AccountID` FROM `accounts` WHERE `Status`>0) ORDER BY `Level` DESC LIMIT 10;");
$res = mysql_query($query);
echo("Top Trojans<br />");
while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {
printf("Character: %s Level: %s", $row["CharName"], $row["Level"]);
echo("<br />");
}
$query = mysql_real_escape_string("SELECT `CharName`,`Level` FROM `characters` WHERE `Job` BETWEEN 20 AND 25 AND `Account` NOT IN(SELECT `AccountID` FROM `accounts` WHERE `Status`>0) ORDER BY `Level` DESC LIMIT 10;");
$res = mysql_query($query);
echo("<br />");
echo("Top Warriors<br />");
while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {
printf("Character: %s Level: %s", $row["CharName"], $row["Level"]);
echo("<br />");
}
mysql_free_result($res);
?>
Ah, ok, didn't think of that, saw it, and was like huh... how does that make sense, lol, but didn't think to change it. Anyway, taking a break from quest making for a few, so I'll take a look at this again and see if I can find a way to make it work...
Good luck
Quote:
Originally Posted by nTL3fTy
Here's an example, using my query with an added inner query to remove the high level accounts that are GMs. Of course, you will need to modify it to make it prettier as right now it only prints the data plainly. Hopefully you get the idea.
Top Players In Reg. Page 12/12/2009 - CO2 Private Server - 3 Replies Hey guys, i'm trying to find a reg page that has a tab for top players or it shows top players under where you input your info. Thanks for all help :)
Max Players 11/15/2008 - CO2 Private Server - 8 Replies I want Know how i can make My Server Max Player
loggin on it Like 200 Player
and Something more
how i can Delet the NPC Guy For make RB
can some one Give me Id and i will Delet From my Server
For all PoA players 08/30/2008 - RF Online - 0 Replies PoA Game Masters Response
Think before you cheat