Ignore:
Timestamp:
Mar 13, 2008, 8:18:42 PM (17 years ago)
Author:
george
Message:

Aktualizace na minimanager 0.1.6g.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/ahstats.php

    r178 r307  
    3838
    3939 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");
    4141        if ($sql->num_rows($result)){
    4242                $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) ";
    4444        } else $order_side = "";
    4545 } else $order_side = "";
    4646
    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_race
    49  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`
     50LEFT 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`
    5252 $order_side ORDER BY `auctionhouse`.`$order_by` $order_dir LIMIT $start, $itemperpage");
    5353 $this_page = $sql->num_rows($result);
     
    180180
    181181 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");
    183183        if ($sql->num_rows($result)){
    184184                $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) ";
    186186        } else $order_side = "";
    187187 } else $order_side = "";
     
    200200                if ($search_quality >= 0) $item_prefix .= "AND Quality = '$search_quality' ";
    201201
    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");
    203203                $search_filter = "AND auctionhouse.item_template IN(0";
    204204                while ($item = $sql->fetch_row($result)) $search_filter .= ", $item[0]";
     
    212212
    213213        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%'");
    215215                $search_filter = "AND auctionhouse.itemowner IN(0";
    216216                while ($char = $sql->fetch_row($result)) $search_filter .= ", $char[0]";
     
    218218        break;
    219219        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%'");
    221221                $search_filter = "AND auctionhouse.buyguid IN(-1";
    222222                while ($char = $sql->fetch_row($result)) $search_filter .= ", $char[0]";
     
    227227 }
    228228
    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_race
    231  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_filter
     229$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
    233233 $order_side ORDER BY `auctionhouse`.`$order_by` $order_dir LIMIT $sql_search_limit");
    234234 $tot_found = $sql->num_rows($result);
Note: See TracChangeset for help on using the changeset viewer.