I know perfectly how numbers are represented and the decimal and binary coding systems.
This is the problem:
after the first replies to this thread I understood that the binary string with all the on-off (0-1) settings was stored as an integer in mysql.
PHP Code:
// Defined constants used for user field.
$_USEROPTIONS = array(
'showsignatures' => 1,
'showavatars' => 2,
'showimages' => 4,
'coppauser' => 8,
'adminemail' => 16,
From this code I thought that if I want to see if the signature is enabled i have to check the bit #1, #2 for avatar, #4 for images, #8 for coppa, and #16 for email.
I suppose that the "WHERE options & 16" condition goes to check the bit #16 if is "ON" or "TRUE", or... 1!
Am I wrong?
The other posts (16 or not 16 :P ) confused me a bit...