From 6a791d528e906e8a9c3116f1351de36794898b24 Mon Sep 17 00:00:00 2001 From: lopar Date: Fri, 11 Jan 2019 23:57:15 +0200 Subject: [PATCH] two type test --- classes/InventoryItem.php | 24 ++++++++++++++++++++++++ test.php | 5 +++++ 2 files changed, 29 insertions(+) create mode 100644 classes/InventoryItem.php diff --git a/classes/InventoryItem.php b/classes/InventoryItem.php new file mode 100644 index 0000000..5fd8344 --- /dev/null +++ b/classes/InventoryItem.php @@ -0,0 +1,24 @@ + + +BTN; + } +} \ No newline at end of file diff --git a/test.php b/test.php index ebb962e..b8897d8 100644 --- a/test.php +++ b/test.php @@ -15,11 +15,16 @@ require_once 'config.php'; # $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value} $result = db::c()->query('SELECT * FROM `shop` WHERE count > 0'); +$result2 = db::c()->query('SELECT * FROM `inventory` WHERE owner = 11263'); while ($row = $result->fetch_assoc()) { $iteminfo[] = new ShopItem($row); } +while ($row = $result2->fetch_assoc()) { + $iteminfo[] = new InventoryItem($row); +} + echo ""; foreach ($iteminfo as $ii) { echo "
Товары магазина
";