Changeset 705 for trunk/pages/spolek.php


Ignore:
Timestamp:
Apr 4, 2010, 9:37:19 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Nově načítat informace o hráčích přímo ze samostatných sloupců tabulky namísto sloupce zrušeného data.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pages/spolek.php

    r695 r705  
    1818  $DbResult = $db2->query('SELECT `guildid`, `name`, FROM_UNIXTIME(`createdate`) AS `createdate` FROM `guild` WHERE `guildid` = '.$guild_id.' LIMIT 1');
    1919  $guild_data = $DbResult->fetch_assoc();
    20   $members = $db2->query('SELECT guild_member.guid, guild_member.rank AS mrank, `characters`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS level, (SELECT rname FROM guild_rank WHERE guildid ='.$guild_id.' AND rid = mrank + 1) AS rname, guild_member.pnote, guild_member.offnote FROM guild_member,`characters` LEFT JOIN guild_member k1 ON k1.`guid`=`characters`.`guid` WHERE guild_member.guildid = '.$guild_id.' AND guild_member.guid=`characters`.guid ORDER BY mrank');
     20  $members = $db2->query('SELECT `guild_member`.`guid`, `guild_member`.`rank` AS `mrank`, `characters`.`name`, `characters`.`level`, (SELECT `rname` FROM `guild_rank` WHERE `guildid` ='.$guild_id.' AND `rid` = `mrank` + 1) AS `rname`, `guild_member`.`pnote`, `guild_member`.`offnote` FROM `guild_member`,`characters` LEFT JOIN `guild_member` AS `k1` ON `k1`.`guid`=`characters`.`guid` WHERE `guild_member`.`guildid` = '.$guild_id.' AND `guild_member`.`guid`=`characters`.`guid` ORDER BY `mrank`');
    2121  $total_members = $members->num_rows;
    22   $DbResult = $db2->query('SELECT count(*) AS online_mem  FROM `guild_member`, `characters`, `guild` WHERE guild.guildid = '.$guild_id.' AND guild_member.guildid = guild.guildid AND guild_member.guid = characters.guid AND characters.online = 1');
     22  $DbResult = $db2->query('SELECT count(*) AS `online_mem`  FROM `guild_member`, `characters`, `guild` WHERE `guild`.`guildid` = '.$guild_id.' AND `guild_member`.`guildid` = `guild`.`guildid` AND `guild_member`.`guid` = `characters`.`guid` AND `characters`.`online` = 1');
    2323  $online_mem = $DbResult->fetch_assoc();
    2424
     
    4242      <td>'.$total_members.' (Online : '.$online_mem['online_mem'].')</td>
    4343    </tr>');
    44   $DbResult = $db->query('SELECT Homepage FROM GuildInfo WHERE Guild='.$guild_id.' AND Realm='.$Realm->Id);
     44  $DbResult = $db->query('SELECT `Homepage` FROM `GuildInfo` WHERE `Guild`='.$guild_id.' AND `Realm`='.$Realm->Id);
    4545  $DbRow = $DbResult->fetch_assoc();
    4646  $Homepage = $DbRow['Homepage'];
     
    6969  while($member = $members->fetch_row())
    7070  {   
    71     $query = $db2->query('SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data, " ", '.($Config['Mangos']['CharacterDataOffset']['Gender'] + 1).'), " ", -1) as unsigned) ), 8, 0), 4, 1) as gender FROM `characters` WHERE `guid` = '.$member[0].' LIMIT 1;');
     71    $query = $db2->query('SELECT `race`,`class`,`online`, `account`, `logout_time`, `level`, `gender` FROM `characters` WHERE `guid` = '.$member[0].' LIMIT 1;');
    7272    $online = $query->fetch_assoc();
    7373    $accid = $online['account'];
Note: See TracChangeset for help on using the changeset viewer.