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...
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
Here is the sql query, i just create it
$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];
}
if to change to echo $row[7] like this vrohecho $row[7];
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
here is the right query
:v sorry vroh, but I want work to all included with the payer does not have a guild :junglejane:-_- u say only for guild