Log in

View Full Version : vB3 options


filburt1
02-15-2004, 02:31 PM
Is it possible to extract a single option from the options bits for each user (specifically, the option for receiving e-mails on PMs) in a query, rather than using vB3's bitmasking function later?

KuraFire
02-15-2004, 04:32 PM
you mean..

SELECT IF(options & 4096, 1, 0) AS emailonpm FROM user

?

That will give you 1 if they have it enabled (YES email on PM), and 0 if they have not.

filburt1
02-15-2004, 04:57 PM
Thanks...didn't realize that MySQL had a bitwise and like PHP.

KuraFire
02-15-2004, 07:47 PM
But of course :)

it's not That bad a db ;)