PHP script for guild in top pvp

Results 1 to 13 of 13
  1. #1
    Proficient Member agoenk is offline
    MemberRank
    Feb 2013 Join Date
    SystemRoot\NoobLocation
    172Posts

    sad PHP script for guild in top pvp

    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.


  2. #2
    Newbe likertuban is online now
    ModeratorRank
    Apr 2012 Join Date
    2,341Posts

    Re: PHP script for guild in top pvp

    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...

  3. #3
    Proficient Member agoenk is offline
    MemberRank
    Feb 2013 Join Date
    SystemRoot\NoobLocation
    172Posts

    Re: PHP script for guild in top pvp

    Quote Originally Posted by likertuban View Post
    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 by agoenk; 30-06-15 at 02:41 AM.

  4. #4
    no failure, no greget! dodojimbun is offline
    MemberRank
    Jun 2012 Join Date
    IndonesiaLocation
    511Posts

    Re: PHP script for guild in top pvp

    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

  5. #5
    Proficient Member agoenk is offline
    MemberRank
    Feb 2013 Join Date
    SystemRoot\NoobLocation
    172Posts

    Re: PHP script for guild in top pvp

    Quote Originally Posted by dodojimbun View Post
    Here is the sql query, i just create it
    Nice info vroh, I will try after sahur time

  6. #6
    Proficient Member agoenk is offline
    MemberRank
    Feb 2013 Join Date
    SystemRoot\NoobLocation
    172Posts

    Re: PHP script for guild in top pvp

    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
    $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 by agoenk; 01-07-15 at 03:57 AM. Reason: add image

  7. #7
    no failure, no greget! dodojimbun is offline
    MemberRank
    Jun 2012 Join Date
    IndonesiaLocation
    511Posts

    Re: PHP script for guild in top pvp

    $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.

  8. #8
    Proficient Member agoenk is offline
    MemberRank
    Feb 2013 Join Date
    SystemRoot\NoobLocation
    172Posts

    Re: PHP script for guild in top pvp

    Quote Originally Posted by dodojimbun View Post
    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 by agoenk; 01-07-15 at 04:28 AM.

  9. #9
    no failure, no greget! dodojimbun is offline
    MemberRank
    Jun 2012 Join Date
    IndonesiaLocation
    511Posts

    Re: PHP script for guild in top pvp

    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

  10. #10
    Proficient Member agoenk is offline
    MemberRank
    Feb 2013 Join Date
    SystemRoot\NoobLocation
    172Posts

    Re: PHP script for guild in top pvp

    Quote Originally Posted by dodojimbun View Post
    here is the right query
    work vroh but for a player who has no guild can't perform

  11. #11
    no failure, no greget! dodojimbun is offline
    MemberRank
    Jun 2012 Join Date
    IndonesiaLocation
    511Posts

    Re: PHP script for guild in top pvp

    -_- u say only for guild

  12. #12
    Proficient Member agoenk is offline
    MemberRank
    Feb 2013 Join Date
    SystemRoot\NoobLocation
    172Posts

    Re: PHP script for guild in top pvp

    Quote Originally Posted by dodojimbun View Post
    -_- u say only for guild
    :v sorry vroh, but I want work to all included with the payer does not have a guild

  13. #13
    no failure, no greget! dodojimbun is offline
    MemberRank
    Jun 2012 Join Date
    IndonesiaLocation
    511Posts

    Re: PHP script for guild in top pvp

    find it your self i'm already give u 2 query that you can develop it more



Advertisement