This commit is contained in:
Igor Barkov [iwork]
2019-02-15 17:00:01 +02:00
parent f61dd3f527
commit 313870a1fc
3 changed files with 55 additions and 47 deletions

View File

@@ -15,16 +15,16 @@ require_once 'config.php';
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
$iteminfo =[];
$result = db::c()->query('SELECT `shop`.*,
`magic`.`name` AS `magic_name`,
`magic`.`chanse` AS `magic_chanse`,
`magic`.`time` AS `magic_time`,
`magic`.`file` AS `magic_file`,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img`
FROM `shop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE count > 0 LIMIT 25');
//$result = db::c()->query('SELECT `shop`.*,
// `magic`.`name` AS `magic_name`,
// `magic`.`chanse` AS `magic_chanse`,
// `magic`.`time` AS `magic_time`,
// `magic`.`file` AS `magic_file`,
// `magic`.`targeted` AS `magic_targeted`,
// `magic`.`needcharge` AS `magic_needcharge`,
// `magic`.`img` AS `magic_img`
//
//FROM `shop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE count > 0 LIMIT 25');
$result2 = db::c()->query('SELECT `inventory`.*,
`magic`.`name` AS `magic_name`,
`magic`.`chanse` AS `magic_chanse`,
@@ -33,9 +33,9 @@ $result2 = db::c()->query('SELECT `inventory`.*,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE owner = 11263');
while ($row = $result->fetch_assoc()) {
$iteminfo[] = new ShopItem($row);
}
//while ($row = $result->fetch_assoc()) {
// $iteminfo[] = new ShopItem($row);
//}
while ($row = $result2->fetch_assoc()) {
$iteminfo[] = new InventoryItem($row);