Shaiya PHP Ranking script

03/27/2016 22:29 catalinbebe#1
Hello there, i was wondering if anyone could help me with my pvp ranking script. At the moment my server is running shared kills and my pvp ranking is showing up all characters from account. How can i reduce it to just 1 character?
03/28/2016 19:27 killer2p#2
make a clause where it reads slot 1, 2 ,3 ,4 etc
03/28/2016 19:53 catalinbebe#3
Well i've tryed to make it show just slot 0 characters, but there are people that arent showing on ranks because they are using another slot, so i wonder how can i make it really work. I think i need to put like a condition
03/30/2016 15:35 killer2p#4
if slot is empty check slot b else c else etc
03/30/2016 17:56 HellRevenger#5
You can show us your query which is showing the players, and we will probably help you
03/30/2016 22:42 catalinbebe#6
Atm using this one but it just shows slot 0 characters.
Quote:
//--------------Database Connection-----------------
$conn = @odbc_connect("Driver={SQL Server};Server=$server;", $dbuser, $dbpass) or die("Database Connection Error!");;

$query = "SELECT TOP ".$MaxRank." c.CharName,c.K1,c.K2,c.Job,c.Level,umg.Country
FROM PS_GameData.dbo.Chars c
INNER JOIN PS_UserData.dbo.Users_Master um ON c.useruid=um.useruid
INNER JOIN PS_GameData.dbo.UserMaxGrow umg ON umg.UserUID=c.UserUID
WHERE um.status=0 AND c.Del=0 AND c.Slot=0 AND c.K1 > 1 ORDER BY c.k1 DESC";
$result = odbc_exec($conn, $query);
03/31/2016 04:16 AxelMac#7
Quote:
Originally Posted by catalinbebe View Post
Atm using this one but it just shows slot 0 characters.
try this query

after change your value.