Problem arose when a record somehow got a null status, and was failing to toggle. Yuck. Time to refactor that evilness away.update filter_rules set rule_status = (case rule_status when 0 then 1 when 1 then 0 end) where rule_type=1 and filter_rule_id= ?