Quote:
Originally Posted by Torankusu
I should have asked outright, but is there no real downside to storing information in the column for modifications or enchantments like this? :
ENCHANTMENTS
{str,1},{dex,2}
and accessing it similar to an array:
example = {str,1}, {dex,2}
|
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.
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.