|
You last visited: Today at 23:28
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.
12/11/2008, 23:33
|
#1
|
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.
|
|
|
12/12/2008, 14:33
|
#2
|
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 :
|
|
|
12/12/2008, 15:26
|
#3
|
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
|
|
|
12/12/2008, 15:28
|
#4
|
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
|
i c
|
|
|
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?
|
|
|
12/12/2008, 22:45
|
#6
|
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
|
|
|
12/13/2008, 19:07
|
#7
|
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.
|
|
|
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.
|
|
|
12/13/2008, 23:33
|
#9
|
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
|
Quote:
Originally Posted by Incariuz
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
|
|
|
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, 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]
|
|
|
12/14/2008, 00:27
|
#11
|
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;
|
|
|
12/14/2008, 00:27
|
#12
|
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
|
|
|
12/14/2008, 03:16
|
#13
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
Quote:
Originally Posted by Beta Limit
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...
|
|
|
12/14/2008, 12:02
|
#14
|
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($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);
?>
|
|
|
12/14/2008, 12:03
|
#15
|
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 72
|
Quote:
Originally Posted by Incariuz
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.
|
Thank you so much it worked you are a genius
|
|
|
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.
|
|