This commit is contained in:
Igor Barkov [iwork] 2019-01-11 18:17:45 +02:00
parent dc70c360b7
commit 730c016367
2 changed files with 10 additions and 2 deletions

View File

@ -30,6 +30,11 @@ print_r($items);
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
while ($row = $result->fetch_assoc()) {
$iteminfo[] = new Item($row);
}
$iteminfo[] = new ItemStats($row);
}
foreach ($iteminfo as $iinfo) {
$iinfo->printItemStats();
}

View File

@ -122,7 +122,10 @@ class Item
$this->mfuvorot = $row['mfuvorot'];
$this->mfauvorot = $row['mfauvorot'];
}
}
class ItemStats extends Item
{
public function printItemStats()
{
echo $this->name ." (Масса: ". $this->massa .")<br>";