MySQL: Simple way to toggle a value of an int field
UPDATE table SET field = 1 - field
UPDATE some_table SET an_int_value = IF(an_int_value=1, 0, 1)
UPDATE some_table SET an_int_value = IF(an_int_value=1, 0, 1);
http://dev.mysql.com/doc/refman/5.1/en/control-flow-functions.html#function_if