tests
This commit is contained in:
parent
dc70c360b7
commit
730c016367
@ -30,6 +30,11 @@ print_r($items);
|
|||||||
|
|
||||||
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
|
# $items = []; foreach(фетч того ебучего массива as $value) {$items[$value['id']] = $value}
|
||||||
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
|
$result = db::c()->query('SELECT * FROM `shop` WHERE count > 0');
|
||||||
|
|
||||||
while ($row = $result->fetch_assoc()) {
|
while ($row = $result->fetch_assoc()) {
|
||||||
$iteminfo[] = new Item($row);
|
$iteminfo[] = new ItemStats($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($iteminfo as $iinfo) {
|
||||||
|
$iinfo->printItemStats();
|
||||||
|
}
|
||||||
|
@ -122,7 +122,10 @@ class Item
|
|||||||
$this->mfuvorot = $row['mfuvorot'];
|
$this->mfuvorot = $row['mfuvorot'];
|
||||||
$this->mfauvorot = $row['mfauvorot'];
|
$this->mfauvorot = $row['mfauvorot'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ItemStats extends Item
|
||||||
|
{
|
||||||
public function printItemStats()
|
public function printItemStats()
|
||||||
{
|
{
|
||||||
echo $this->name ." (Масса: ". $this->massa .")<br>";
|
echo $this->name ." (Масса: ". $this->massa .")<br>";
|
||||||
|
Loading…
Reference in New Issue
Block a user