diff --git a/classes/Item.php b/classes/Item.php index 5f7d0fd..0139989 100644 --- a/classes/Item.php +++ b/classes/Item.php @@ -122,12 +122,4 @@ class Item $this->mfuvorot = $row['mfuvorot']; $this->mfauvorot = $row['mfauvorot']; } -} - -class ItemStats extends Item -{ - public function printItemStats() - { - echo $this->name ." (Масса: ". $this->massa .")
"; - } } \ No newline at end of file diff --git a/classes/ItemClass.php b/classes/ItemClass.php new file mode 100644 index 0000000..180e9ce --- /dev/null +++ b/classes/ItemClass.php @@ -0,0 +1,15 @@ +name ." (Масса: ". $this->massa .")
"; + } +} \ No newline at end of file diff --git a/test.php b/test.php index bf25b59..5a96d64 100644 --- a/test.php +++ b/test.php @@ -17,7 +17,7 @@ require_once 'config.php'; $result = db::c()->query('SELECT * FROM `shop` WHERE count > 0'); while ($row = $result->fetch_assoc()) { - $iteminfo[] = new ItemStats($row); + $iteminfo[] = new Item($row); } foreach ($iteminfo as $iinfo) {