Don't make things more complicated than they need to be. MySQL lets you use '&' in WHERE statements.
Code:
SELECT id,name FROM items WHERE classes & 1 AND itemtype = 10;
To save you time, here is a list of the classes and bitmasks:
Code:
WAR 1
CLR 2
PAL 4
RNG 8
SHD 16
DRU 32
MNK 64
BRD 128
ROG 256
SHM 512
NEC 1024
WIZ 2048
MAG 4096
ENC 8192
BST 16384
ALL 32767