Bitwise operators in select statements for using Bitmasks: Advanced

This demonstrates searching bitmasks using named constants. It uses a more complex way to represent the constants, which is more powerful for showing common characteristics.

You must execute the code again to save those values in the database.
idorder_nameproductquantitybitmaskmatched_attributes
11MyOrderpants12129924COLOR_LIME, SIZE_XS, MATERIAL_COTTON
12MyOrderpants12129924COLOR_LIME, SIZE_XS, MATERIAL_COTTON
13MyOrderpants12359360COLOR_MAGENTA, SIZE_L, MATERIAL_COTTON
14MyOrderpants12359360COLOR_MAGENTA, SIZE_L, MATERIAL_COTTON