$db
$db : resource
An inventory item.
Represents an object from the table 'inventory'.
$id : integer|\K_Unit
__construct(resource $db, integer $id, integer $type = null)
Constructor.
Searches the database and retrieves the information about the building, populating it and it's items.
| resource | $db | Connection to the database. |
| integer | $id | Item identifier. |
| integer | $type | Item type identifier. Optional, will try to guess if null. |