I have column named settings (type: tinyint unsigned not null).
That contains user settings in bits (0/1).
For example when i want update setting_1 then i do:
UPDATE `users` SET `settings`=`settings`|1
(That sets setting1 to 1 (true) ).
But, how i can do multiple update one column? For example:
UPDATE `users`
SET
`settings`=`settings`|1,
`settings`=`settings`&~2,
`settings`=`settings`|4
WHERE `user`='xyz';
Any links that explain it?