DB = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $user_id);
} catch (Exception $e) {
echo '
Не прогрузилась таблица inventory (*) для класса DressedItems.
';
}
}
private function getBonusesFromDressedItems($user_id)
{
try {
$query = << 0'
SQL;
$this->DBSUM = db::c()->query($query, $user_id)->fetch_assoc();
} catch (Exception $e) {
echo 'Не прогрузилась таблица inventory (SUM) для класса DressedItems.
';
}
}
public function getItemsInSlots($user_id)
{
if (!$this->DB) {
$this->getDressedItems($user_id);
}
while ($row = $this->DB->fetch_assoc()) {
$dressed_item[$row['dressed_slot']] = $row;
$this->dressedItem[$row['dressed_slot']] = $row;
}
}
public function getBonusesAmount($user_id)
{
if (!$this->DBSUM) {
$this->getBonusesFromDressedItems($user_id);
}
return $this->DBSUM;
}
}