Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

PHP script for guild in top pvp

Junior Spellweaver
Joined
Feb 14, 2013
Messages
172
Reaction score
19
How to show guild in php script top pvp? Because I try to add with id from tbl_Guild, all players show 1 same guild and double player name. Please clue for queries.
Sorry bad my english
 
Last edited:
Junior Spellweaver
Joined
Feb 14, 2013
Messages
172
Reaction score
19
i think what you need : "inner join" tbl_general guildserial column part with tbl_guild serial column
after joining, you can take the guild name from tbl_guild...

Thank for a clue vroh, but inner join in sql server like Trigger?
 
Last edited:
Upvote 0
Joined
Jun 7, 2012
Messages
506
Reaction score
23
Here is the sql query, i just create it

use rf_world_novus
select g.guildserial, b.accountserial, b.account, b.serial 'char serial', b.name 'char name'
from tbl_base b inner join tbl_general g
on b.serial = g.serial
where g.guildserial in (select serial from tbl_guild where id = 'guild name') and b.dck = 0
 
Upvote 0
Junior Spellweaver
Joined
Feb 14, 2013
Messages
172
Reaction score
19
Now how do in order to bring together the same name and change the numbers GuildSerial in tbl_general to Guild name in id tbl_Guild?

agoenk - PHP script for guild in top pvp - RaGEZONE Forums


and this my query
$query ='SELECT t1.Name, t1.Class, t1.Lv, t1.Race, t1.Serial, t2.PvpPoint, t2.PvpCash, t4.id, t3.GuildSerial, t3.TotalPlayMin, t1.AccountSerial
FROM tbl_pvporderview AS t2, tbl_Guild AS t4, tbl_base AS t1 inner join tbl_general AS t3 ON t1.Serial = t3.Serial
WHERE t1.Serial = t2.Serial and DeleteName ="*"
ORDER BY t2.PvpCash DESC, t1.Lv desc';

and for Guild Coloum
if ($row[8]=="-1"){
echo '<center>-</center>';
}
if ($row[8]>="0"){
echo $row[8];
}
 
Last edited:
Upvote 0
Joined
Jun 7, 2012
Messages
506
Reaction score
23
$query ='SELECT t1.Name, t1.Class, t1.Lv, t1.Race, t1.Serial, t2.PvpPoint, t2.PvpCash, t4.id, t3.id, t3.GuildSerial, t3.TotalPlayMin, t1.AccountSerial
FROM tbl_pvporderview AS t2, tbl_Guild AS t4, tbl_base AS t1 inner join tbl_general AS t3 ON t1.Serial = t3.Serial
WHERE t1.Serial = t2.Serial and DeleteName ="*"
ORDER BY t2.PvpCash DESC, t1.Lv desc';


then row still 8
 
Last edited:
Upvote 0
Junior Spellweaver
Joined
Feb 14, 2013
Messages
172
Reaction score
19
echo $row[7];
if to change to echo $row[7] like this vroh
if ($row[7]>="1"){
echo $row[7];
agoenk - PHP script for guild in top pvp - RaGEZONE Forums


or
if ($row[8]>="1"){
echo $row[7];
still same, and there is double name
 
Last edited:
Upvote 0
Joined
Jun 7, 2012
Messages
506
Reaction score
23
here is the right query
SELECT t1.Name, t1.Class, t1.Lv, t1.Race, t1.Serial, t2.PvpPoint, t2.PvpCash, t4.id, t3.GuildSerial, t3.TotalPlayMin, t1.AccountSerial
FROM tbl_pvporderview AS t2 inner join tbl_base as t1
on t2.serial = t1.serial
inner join tbl_general AS t3
ON t3.Serial = t1.Serial
inner join tbl_guild as t4
on t4.serial = t3.guildserial
WHERE t1.Serial = t2.Serial and t1.dck = 0
 
Upvote 0
Back
Top