mysql - Table for site options -- how to handle multiple value types? -
i'm creating (mysql) table site options, have multiple key/value rows (option_name, option_value). values boolean, strings(varchars) , might int. have option_value set varchar it's able store values. there better way this? thinking of having 3 rows (enum true false, int int_value , varchar string_value), seems inefficient. there better way and/or doing wrong?
i'd prefer have 3 different columns representing value types, opposed having 1 over-loaded column. fact 3 columns sort of self-explanatory (assuming pertinent naming), , wouldn't have write sort of adapter correctly handle 3 values types stored in single column.
Comments
Post a Comment