30.06.2012, 03:13
Hi. I've never used binary or whatever before, it's completely new to me. I get how it works, just not sure how to use it.
I need to save 144 true/false (0/1) variables to mySQL and don't want to have 144 fields. What would be the best way to do that? A string with 0's and 1's? Or some sort of binary number thing?
If I use a string I can just loop through the characters and if string[i] == '1' it's true - just not sure how efficient this is.
I need to save 144 true/false (0/1) variables to mySQL and don't want to have 144 fields. What would be the best way to do that? A string with 0's and 1's? Or some sort of binary number thing?
If I use a string I can just loop through the characters and if string[i] == '1' it's true - just not sure how efficient this is.