Changeset 307 for minimanager/guild.php
- Timestamp:
- Mar 13, 2008, 8:18:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/guild.php
r304 r307 32 32 33 33 $query = $sql->query("SELECT guild.guildid AS gid, guild.name AS name,guild.leaderguid AS lguid,SUBSTRING_INDEX(guild.MOTD,' ',6), guild.createdate, 34 (SELECT name FROM `character ` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars34 (SELECT name FROM `characters` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars 35 35 FROM guild ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 36 36 $this_page = $sql->num_rows($query); … … 71 71 while ($data = $sql->fetch_row($query)) { 72 72 73 $gonline = $sql->query("SELECT count(*) AS GCNT FROM `guild_member`, `character `, `guild` WHERE guild.guildid = ".$data[0]." AND guild_member.guildid = guild.guildid AND guild_member.guid = character.guid AND character.online = 1;");73 $gonline = $sql->query("SELECT count(*) AS GCNT FROM `guild_member`, `characters`, `guild` WHERE guild.guildid = ".$data[0]." AND guild_member.guildid = guild.guildid AND guild_member.guid = characters.guid AND characters.online = 1;"); 74 74 $guild_online = $sql->result($gonline,"GCNT"); 75 75 … … 114 114 115 115 if ($search_by == "leaderguid"){ 116 $temp = $sql->query("SELECT guid FROM `character ` WHERE name ='$search_value'");116 $temp = $sql->query("SELECT guid FROM `characters` WHERE name ='$search_value'"); 117 117 $search_value = $sql->result($temp, 0, 'guid'); 118 118 } 119 119 120 120 $query = $sql->query("SELECT guild.guildid AS gid, guild.name AS name,guild.leaderguid AS lguid,SUBSTRING_INDEX(guild.MOTD,' ',6), guild.createdate, 121 (SELECT name FROM `character ` WHERE guid = lguid) AS l_name, (SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars121 (SELECT name FROM `characters` WHERE guid = lguid) AS l_name, (SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars 122 122 FROM guild WHERE $search_by LIKE '%$search_value%' ORDER BY $order_by $order_dir LIMIT $sql_search_limit"); 123 123 $total_found = $sql->num_rows($query); … … 197 197 198 198 $members = $sql->query("SELECT guild_member.guid, guild_member.rank AS mrank, 199 `character `.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', 35), ' ', -1) AS level,200 (SELECT rname FROM guild_rank WHERE guildid ='$guild_id' AND rid = mrank ) AS rname,199 `characters`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 35), ' ', -1) AS level, 200 (SELECT rname FROM guild_rank WHERE guildid ='$guild_id' AND rid = mrank+1) AS rname, 201 201 guild_member.Pnote, guild_member.OFFnote 202 FROM guild_member,`character `203 LEFT JOIN guild_member k1 ON k1.`guid`=`character `.`guid`204 WHERE guild_member.guildid = '$guild_id' AND guild_member.guid=`character `.guid202 FROM guild_member,`characters` 203 LEFT JOIN guild_member k1 ON k1.`guid`=`characters`.`guid` 204 WHERE guild_member.guildid = '$guild_id' AND guild_member.guid=`characters`.guid 205 205 ORDER BY mrank"); 206 206 … … 252 252 while ($member = $sql->fetch_row($members)){ 253 253 254 $query = $sql->query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`character `.`data`, ' ', 35), ' ', -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `character` WHERE `name` = '$member[2]';");254 $query = $sql->query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 35), ' ', -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE `name` = '$member[2]';"); 255 255 256 256 $online = $sql->fetch_row($query); … … 335 335 <td><img src='img/c_icons/{$online[1]}.gif' onmousemove='toolTip(\"".get_player_class($online[1])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 336 336 <td>$lev</td> 337 <td> ".($member[4]?$member[4]:$lang_guild['guild_leader'])."($member[1])</td>337 <td>$member[4] ($member[1])</td> 338 338 <td>$member[5]</td> 339 339 <td>$member[6]</td> … … 405 405 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 406 406 407 $char_data = $sql->query("SELECT data FROM `character ` WHERE guid = '$guid' LIMIT 1");407 $char_data = $sql->query("SELECT data FROM `characters` WHERE guid = '$guid' LIMIT 1"); 408 408 $data = $sql->result($char_data, 0, 'data'); 409 409 $data = explode(' ',$data); … … 411 411 $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 412 412 $data = implode(' ',$data); 413 $sql->query("UPDATE `character ` SET data = '$data' WHERE guid = '$guid'");413 $sql->query("UPDATE `characters` SET data = '$data' WHERE guid = '$guid'"); 414 414 $sql->query("DELETE FROM guild_member WHERE guid = '$guid'"); 415 415
Note:
See TracChangeset
for help on using the changeset viewer.