Hmm I just looked at the latest item dump, and it stores races and classes in decimal format like bori mentioned.
I don't know of (or if there is a way) to directly query for the items usable by a given class or race... Well I guess you
could look for all possible combinations but that isn't very pratical. The easiest thing of the top of my head would be to modify the table, or make an additional table to hold the bit fields as seperate values.
So make a seperate table a matching ID field and populate it with the class and race data. Make a script to do that of course
ID,war,nec,enc,wiz...hum,trl,ogr...
1001,1,1,1,1...1,0,0...
Then just query aginst both tables linked on the ID field
Biggest downside I see is having to update your new table for any new items.