• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

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

 
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?



and this my query

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];


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
 
Upvote 0