PHP Script for Top Players.

Play Now

KnightRider

Dedicated Member
Dedicated Member
Oct 30, 2003
107
1
45
SQL statments:

To show all players in top 10 including GMs:

Code:
SELECT TOP 10 c.Fld_CharName,c.Fld_Level,c.Fld_Exp
  FROM Tbl_CharInfo c 
  ORDER BY c.Fld_Level DESC,c.Fld_Exp DESC

as shown in the image under (A)

To show all players in top 10 without GMs:

Code:
SELECT TOP 10 c.Fld_CharName,c.Fld_Level,c.Fld_Exp,a.FLD_PLAYERNAME
  FROM Tbl_CharInfo c 
  LEFT JOIN TBL_ADMIN a ON (a.FLD_PLAYERNAME = c.Fld_CharName)
  WHERE a.FLD_PLAYERNAME is null
  ORDER BY c.Fld_Level DESC,c.Fld_Exp DESC


as shown in the image under (B)

sqlp.png


Note: Player1 is gm.
 

Primal

LOMCN VIP
VIP
Jun 28, 2004
1,756
102
289
SQL statments:

To show all players in top 10 including GMs:

Code:
SELECT TOP 10 c.Fld_CharName,c.Fld_Level,c.Fld_Exp
  FROM Tbl_CharInfo c 
  ORDER BY c.Fld_Level DESC,c.Fld_Exp DESC

as shown in the image under (A)

To show all players in top 10 without GMs:

Code:
SELECT TOP 10 c.Fld_CharName,c.Fld_Level,c.Fld_Exp,a.FLD_PLAYERNAME
  FROM Tbl_CharInfo c 
  LEFT JOIN TBL_ADMIN a ON (a.FLD_PLAYERNAME = c.Fld_CharName)
  WHERE a.FLD_PLAYERNAME is null
  ORDER BY c.Fld_Level DESC,c.Fld_Exp DESC


as shown in the image under (B)

sqlp.png


Note: Player1 is gm.
its not the sql statements that are hard, its connecting to the sql server securly and retrieving the info
 

KnightRider

Dedicated Member
Dedicated Member
Oct 30, 2003
107
1
45
if they run the webserver on the server there be no problem.

if you going to host the information some where else you need a program running on the server pc getting the sql information and sending it to the other host.

for example look at hell website:

http://hell23.servegame.com/mirstatus/index.php

they run a program on there network pc that connects to there sql server and then that program sends the players information to a php page.


(hope you dont mine me giving out your url out jasper)



if they start to open ports for you to connect they are more likely to get hacks
 

Grinch

Dedicated Member
Dedicated Member
Dec 30, 2008
115
0
43
Azura cant u make 1 script for top heroes level not for MSSql , Im interested for DB Commander.

Tnx in advance.:agree:
 

DiabloVodkaShot

LOMCN VIP
VIP
Feb 20, 2009
2,285
204
245
im sorry but just looking at this it looks like a client side php script not a server side mistake me if im wrong