do not query shop items on when selling something
This commit is contained in:
parent
6566f7e725
commit
c6f86632ef
9
shop.php
9
shop.php
@ -178,7 +178,8 @@ switch ($shopCategoryTypeNumber) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$shopItems = db::c()->query('SELECT `shop`.*,
|
if (false == $saleItems) {
|
||||||
|
$shopItems = db::c()->query('SELECT `shop`.*,
|
||||||
`magic`.`name` AS `magic_name`,
|
`magic`.`name` AS `magic_name`,
|
||||||
`magic`.`chanse` AS `magic_chanse`,
|
`magic`.`chanse` AS `magic_chanse`,
|
||||||
`magic`.`time` AS `magic_time`,
|
`magic`.`time` AS `magic_time`,
|
||||||
@ -189,11 +190,11 @@ $shopItems = db::c()->query('SELECT `shop`.*,
|
|||||||
|
|
||||||
FROM `shop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `count` > 0 AND `cost` > 0 AND `razdel` = ?i ORDER by `nlevel` ASC, `id` ASC', $shopCategoryTypeNumber);
|
FROM `shop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `count` > 0 AND `cost` > 0 AND `razdel` = ?i ORDER by `nlevel` ASC, `id` ASC', $shopCategoryTypeNumber);
|
||||||
|
|
||||||
$iteminfo = [];
|
$iteminfo = [];
|
||||||
while ($row = $shopItems->fetch_assoc()) {
|
while ($row = $shopItems->fetch_assoc()) {
|
||||||
$iteminfo[] = new ShopItem($row);
|
$iteminfo[] = new ShopItem($row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
Loading…
Reference in New Issue
Block a user