Bitwise operators in select statements for using Bitmasks: MySQL basic
Using bitwise operators and defined constants.
| id | order_name | product | quantity | bitmask | matched_attributes |
|---|---|---|---|---|---|
| 11 | MyOrder | pants | 1 | 2129924 | COLOR_LIME, MATERIAL_COTTON, SIZE_XS |
| 12 | MyOrder | pants | 1 | 2129924 | COLOR_LIME, MATERIAL_COTTON, SIZE_XS |
| 13 | MyOrder | pants | 1 | 2359360 | COLOR_MAGENTA, MATERIAL_COTTON, SIZE_L |
| 14 | MyOrder | pants | 1 | 2359360 | COLOR_MAGENTA, MATERIAL_COTTON, SIZE_L |