Changeset 307 for minimanager/ahstats.php
- Timestamp:
- Mar 13, 2008, 8:18:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/ahstats.php
r178 r307 38 38 39 39 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 40 $result = $sql->query("SELECT race FROM `character ` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1");40 $result = $sql->query("SELECT race FROM `characters` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `characters` WHERE account = '$user_id') LIMIT 1"); 41 41 if ($sql->num_rows($result)){ 42 42 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 43 " AND `character `.`race` IN (2,5,6,8,10) " : " AND `character`.`race` IN (1,3,4,7,11) ";43 " AND `characters`.`race` IN (2,5,6,8,10) " : " AND `characters`.`race` IN (1,3,4,7,11) "; 44 44 } else $order_side = ""; 45 45 } else $order_side = ""; 46 46 47 $result = $sql->query("SELECT `character `.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`,48 `auctionhouse`.`time`-unix_timestamp(), `c2`.`name` AS `encherisseur`, `auctionhouse`.`lastbid`, `auctionhouse`.`startbid`, SUBSTRING_INDEX(SUBSTRING_INDEX(`item_instance`.`data`, ' ',15), ' ',-1) AS qty, `character `.`race` AS seller_race, `c2`.`race` AS buyer_race49 FROM `".$characters_db[$realm_id]['name']."`.`character ` , `".$characters_db[$realm_id]['name']."`.`item_instance` , `".$mangos_db[$realm_id]['name']."`.`item_template` , `".$characters_db[$realm_id]['name']."`.`auctionhouse`50 LEFT JOIN `".$characters_db[$realm_id]['name']."`.`character ` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid`51 WHERE `auctionhouse`.`itemowner`=`character `.`guid` AND `auctionhouse`.`item_template`=`item_template`.`entry` AND `auctionhouse`.`itemguid`=`item_instance`.`guid`47 $result = $sql->query("SELECT `characters`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`, 48 `auctionhouse`.`time`-unix_timestamp(), `c2`.`name` AS `encherisseur`, `auctionhouse`.`lastbid`, `auctionhouse`.`startbid`, SUBSTRING_INDEX(SUBSTRING_INDEX(`item_instance`.`data`, ' ',15), ' ',-1) AS qty, `characters`.`race` AS seller_race, `c2`.`race` AS buyer_race 49 FROM `".$characters_db[$realm_id]['name']."`.`characters` , `".$characters_db[$realm_id]['name']."`.`item_instance` , `".$mangos_db[$realm_id]['name']."`.`item_template` , `".$characters_db[$realm_id]['name']."`.`auctionhouse` 50 LEFT JOIN `".$characters_db[$realm_id]['name']."`.`characters` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid` 51 WHERE `auctionhouse`.`itemowner`=`characters`.`guid` AND `auctionhouse`.`item_template`=`item_template`.`entry` AND `auctionhouse`.`itemguid`=`item_instance`.`guid` 52 52 $order_side ORDER BY `auctionhouse`.`$order_by` $order_dir LIMIT $start, $itemperpage"); 53 53 $this_page = $sql->num_rows($result); … … 180 180 181 181 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 182 $result = $sql->query("SELECT race FROM `character ` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1");182 $result = $sql->query("SELECT race FROM `characters` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `characters` WHERE account = '$user_id') LIMIT 1"); 183 183 if ($sql->num_rows($result)){ 184 184 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 185 " AND `character `.`race` IN (2,5,6,8,10) " : " AND `character`.`race` IN (1,3,4,7,11) ";185 " AND `characters`.`race` IN (2,5,6,8,10) " : " AND `characters`.`race` IN (1,3,4,7,11) "; 186 186 } else $order_side = ""; 187 187 } else $order_side = ""; … … 200 200 if ($search_quality >= 0) $item_prefix .= "AND Quality = '$search_quality' "; 201 201 202 $result = $sql->query("SELECT entry FROM ` mangos`.`item_template` WHERE name LIKE '%$search_value%' $item_prefix");202 $result = $sql->query("SELECT entry FROM `".$mangos_db[$realm_id]['name']."`.`item_template` WHERE name LIKE '%$search_value%' $item_prefix"); 203 203 $search_filter = "AND auctionhouse.item_template IN(0"; 204 204 while ($item = $sql->fetch_row($result)) $search_filter .= ", $item[0]"; … … 212 212 213 213 case "seller_name": 214 $result = $sql->query("SELECT guid FROM `character ` WHERE name LIKE '%$search_value%'");214 $result = $sql->query("SELECT guid FROM `characters` WHERE name LIKE '%$search_value%'"); 215 215 $search_filter = "AND auctionhouse.itemowner IN(0"; 216 216 while ($char = $sql->fetch_row($result)) $search_filter .= ", $char[0]"; … … 218 218 break; 219 219 case "buyer_name": 220 $result = $sql->query("SELECT guid FROM `character ` WHERE name LIKE '%$search_value%'");220 $result = $sql->query("SELECT guid FROM `characters` WHERE name LIKE '%$search_value%'"); 221 221 $search_filter = "AND auctionhouse.buyguid IN(-1"; 222 222 while ($char = $sql->fetch_row($result)) $search_filter .= ", $char[0]"; … … 227 227 } 228 228 229 $result = $sql->query("SELECT `character `.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`,230 `auctionhouse`.`time`-unix_timestamp(), `c2`.`name` AS `encherisseur`, `auctionhouse`.`lastbid`, `auctionhouse`.`startbid`, SUBSTRING_INDEX(SUBSTRING_INDEX(`item_instance`.`data`, ' ',15), ' ',-1) AS qty, `character `.`race` AS seller_race, `c2`.`race` AS buyer_race231 FROM `".$characters_db[$realm_id]['name']."`.`character ` , `".$characters_db[$realm_id]['name']."`.`item_instance` , `".$mangos_db[$realm_id]['name']."`.`item_template` , `".$characters_db[$realm_id]['name']."`.`auctionhouse` LEFT JOIN `".$characters_db[$realm_id]['name']."`.`character` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid`232 WHERE `auctionhouse`.`itemowner`=`character `.`guid` AND `auctionhouse`.`item_template`=`item_template`.`entry` AND `auctionhouse`.`itemguid`=`item_instance`.`guid` $search_filter229 $result = $sql->query("SELECT `characters`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`, 230 `auctionhouse`.`time`-unix_timestamp(), `c2`.`name` AS `encherisseur`, `auctionhouse`.`lastbid`, `auctionhouse`.`startbid`, SUBSTRING_INDEX(SUBSTRING_INDEX(`item_instance`.`data`, ' ',15), ' ',-1) AS qty, `characters`.`race` AS seller_race, `c2`.`race` AS buyer_race 231 FROM `".$characters_db[$realm_id]['name']."`.`characters` , `".$characters_db[$realm_id]['name']."`.`item_instance` , `".$mangos_db[$realm_id]['name']."`.`item_template` , `".$characters_db[$realm_id]['name']."`.`auctionhouse` LEFT JOIN `".$characters_db[$realm_id]['name']."`.`characters` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid` 232 WHERE `auctionhouse`.`itemowner`=`characters`.`guid` AND `auctionhouse`.`item_template`=`item_template`.`entry` AND `auctionhouse`.`itemguid`=`item_instance`.`guid` $search_filter 233 233 $order_side ORDER BY `auctionhouse`.`$order_by` $order_dir LIMIT $sql_search_limit"); 234 234 $tot_found = $sql->num_rows($result);
Note:
See TracChangeset
for help on using the changeset viewer.