Quote:
Originally Posted by fowlplay4
You would use: {{"str",1},{"dex",2}}
Using an array would make it harder to query against for statistical purposes, but if it's just being used to load/save then you would be fine doing it that way.
|
this could be useful..
Quote:
I.e. Calculate how many items that have more than 5 strength enchanted exist.
SELECT COUNT(*)
FROM CharacterItems, Enchantments
WHERE Enchantments.CharacterItemID = CharacterItems.ID
AND enchantment = 'str' AND enchantmentvalue > 5;
If you design your system properly the only part that cares how that information is loaded and stored should be easy to change from a column in an array, to it's own table if you decide.
|
dumb question, but, is this modeled after the enchantment table having two separate columns - one for the enchantment name, and the other referencing the value? (str + 5).
ENCHANTMENTS
ID - ItemID - Enchantment - EnchantmentValue
1 - 5 - str - 5
--What would happen if I had an item (itemID 5..) that had multiple enchantments?
ex: str + 5 , dex + 2 ?
Sorry for the redundant questions.