типизация предмета

This commit is contained in:
lopar
2019-01-12 11:34:24 +02:00
parent 3178c5e3a6
commit 9137912c9f
2 changed files with 18 additions and 5 deletions
+2 -2
View File
@@ -14,9 +14,9 @@ require_once 'config.php';
//print_r($items);
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
$iteminfo =[];
$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);
}
@@ -25,7 +25,7 @@ while ($row = $result2->fetch_assoc()) {
$iteminfo[] = new InventoryItem($row);
}
echo "<table width='100%'><th colspan='2'>Товары магазина</th>";
echo "<table width='100%'>";
foreach ($iteminfo as $ii) {
echo "<tr><td bgcolor='#d3d3d3'>";
$ii->printImage();