DB = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->userid);
while ($row = $this->DB->fetch_assoc()) {
$dressed_item[$row['dressed_slot']] = $row;
$this->dressedItem[$row['dressed_slot']] = $row;
}
} catch (Exception $e) {
echo '
getDressedItems: ' . $e . '
';
}
}
public function getSlots()
{
return $this->dressedItem;
}
private function runQuery($user_id)
{
try {
$this->DB = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $user_id);
} catch (Exception $e) {
echo 'getDressedItems: ' . $e . '
';
}
}
public function eeee($user_id)
{
if (!$this->DB) {
$this->runQuery($user_id);
}
while ($row = $this->DB->fetch_assoc()) {
$dressed_item[$row['dressed_slot']] = $row;
$this->dressedItem[$row['dressed_slot']] = $row;
}
}
}