Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 23:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help] With PHP Top Players page.

Discussion on [Help] With PHP Top Players page. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Beta Limit's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
[Help] With PHP Top Players page.

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.
Beta Limit is offline  
Old 12/12/2008, 14:33   #2
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
there was a basic one posted by scottdavey here is the link to it :

turk55 is offline  
Thanks
1 User
Old 12/12/2008, 15:26   #3
 
Beta Limit's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
ok yeah thats the one i got but in that it only shows THE top person, what i want to do is show Top 10 or 30. Thats the help im asking for here
Beta Limit is offline  
Old 12/12/2008, 15:28   #4
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
i c
turk55 is offline  
Old 12/12/2008, 20:04   #5
 
elite*gold: 0
Join Date: Jun 2008
Posts: 384
Received Thanks: 18
dude how do i start the site?
ph03nixx is offline  
Old 12/12/2008, 22:45   #6
 
sherwin9's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 222
Received Thanks: 27
ph03nixx, please keep to this thread, if you want to know how to start the site, try to learn ´HOW TO READ´.

Ciao
sherwin9 is offline  
Old 12/13/2008, 19:07   #7
 
Beta Limit's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
Bumping thread so i dont need to make a new one, Still need help with this.
Beta Limit is offline  
Old 12/13/2008, 22:36   #8
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
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.
Incariuz is offline  
Old 12/13/2008, 23:33   #9
 
Beta Limit's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
Quote:
Originally Posted by Incariuz View Post
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
Beta Limit is offline  
Old 12/14/2008, 00:19   #10
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
Code:
$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;");
then just, .res2[0,1,2,3,4...etc]
tanelipe is offline  
Old 12/14/2008, 00:27   #11
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Code:
SELECT `CharName`,`Level` FROM `characters` WHERE `Job` BETWEEN 40 AND 45 ORDER BY `Level` DESC LIMIT 10;
nTL3fTy is offline  
Old 12/14/2008, 00:27   #12
 
Beta Limit's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
@Tanelipe, i tried that but the next values just show up as blank.

@nTL3fTy, will try that right now

EDIT: Didnt work, just blank spaces again
Beta Limit is offline  
Old 12/14/2008, 03:16   #13
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
Quote:
Originally Posted by Beta Limit View Post
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
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...
Incariuz is offline  
Old 12/14/2008, 12:02   #14
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
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($resMYSQL_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($resMYSQL_ASSOC)) {
    
printf("Character: %s  Level: %s"$row["CharName"], $row["Level"]);
    echo(
"<br />");
}
mysql_free_result($res);
?>
nTL3fTy is offline  
Thanks
1 User
Old 12/14/2008, 12:03   #15
 
Beta Limit's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
Quote:
Originally Posted by Incariuz View Post
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 View Post
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.
Thank you so much it worked you are a genius
Beta Limit is offline  
Reply


Similar Threads Similar Threads
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



All times are GMT +1. The time now is 23:28.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.