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
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 by agoenk; 01-07-15 at 05:01 AM.
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...
Last edited by agoenk; 30-06-15 at 02:41 AM.
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
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$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';
if ($row[8]=="-1"){
echo '<center>-</center>';
}
if ($row[8]>="0"){
echo $row[8];
}
Last edited by agoenk; 01-07-15 at 03:57 AM. Reason: add image
$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 by dodojimbun; 01-07-15 at 04:18 AM.
Last edited by agoenk; 01-07-15 at 04:28 AM.
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
-_- u say only for guild
find it your selfi'm already give u 2 query that you can develop it more