I'm building a gallery. Each image is a row with name and src and order etc.
I want to have 3 more options per image: Featured, Visible, Disabled.
Should I have those as columns?
Or have just 1 column settings and store a 3 binary numbers?
For example:
111 = Featured, Visible, Disabled
110 = Featured, Visible
010 = Visible
001 = Disabled
Or I can even convert that to DEC and simply store a 0 to 7 (like CHMOD style)
What is the best way to do this?
Thanks!
depends. are only programmers with pocket-protectors looking at data and app code? i am all for complexity but i would say spring for a little overhead. also, despite valiant efforts, i have failed to do bit-wise searching in mysql
Problems with bit-wise searching, see this.