I use this.
Code:
SELECT * FROM items WHERE classes & [class bitmask];
Example, items that Berserkers use.
Code:
SELECT * FROM items WHERE classes & 32768;
Here's a
wiki for you, Nydosa, on bitwise operators.
Code:
Operator Meaning
& Bitwise AND.
| Bitwise OR.
^ Bitwise exclusive OR.