KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
MySQL uses TinyINT to serve as a boolean field. Given the possible options of 0 and 1, I decided that I'd flip values like this: UPDATE table SET boolean_field = ABS(boolean_field - 1) WHERE Circle-K = 'Strange things are afoot' So you either go 1 -> 0 -> ABS(0) = 0 or 0 -> -1 -> ABS(-1) = 1 now I'm curious if this is acceptable or horrifying to the real programmers? /me is a beginner
Tags (comma-separated)
Save Edits
Cancel