Mysql bit value
I'm falling into the trap of mySQL optimisation and my question is about using binary values, BIT(3) in particular.
To imagine how I'm using this data think of a permissions table:
(0, 1 , 0)
Three bits, and in that example the user only has write permission.
I'm not worried about the data manipulation side of the equation(php), more the query:
SELECT name FROM permission_table
WHERE bit_colum LIKE b '%1%';
This query does not work, and I would not expect it to either(% only works on text), but my question is how could I make a
SELECT name where user has write permission
so the 3 bits = (any,1,any)