mysql - Figuring out which indices are selected based on a single value -


let's have set of 5 elements people choose from. allowed choose multiple elements.

['a', 'b', 'c', 'd', 'e']

is there way store single value value can determine elements chose? 1 option thought of store binary string. if chose a , b store 11000. if chose a, b, , e, stored 11001. i'm wondering if there different method. couldn't think of appropriate terms search online. thanks.

instead of binary string, why not use decimal integer binary mask? or use string or list of characters selected. of course depending on you're using for, each representation have pros , cons.


Comments