How to store hex from php to mysql, and use bitwise operator to search rows

0

I want to use hex to store options from post form to each rows and use bitwise operator to search row.

Example I have stored this hex in 1 row on column, let's say hexrow:

0x00000444

Search result should be as follows:

Search: hexrow & 0x00000400 (TRUE - should return the row)
      : hexrow & 0x00000040 (TRUE - should return the row)
      : hexrow & 0x00000002 (FALSE - should not return the row)

and so on...

Is this even possible in mysql?

php
mysql
hex
bitwise-and
asked on Stack Overflow Oct 29, 2018 by ACD • edited Oct 29, 2018 by ACD

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0