1) In my table I have a column that set privileges of the users.
I want have a flag 1/0 (yes/not,true/false and so on..) for my privileges (for example: if the user is admin or mod...).
I searched a lot, I'm still confused about the differences about boolean and bit in terms of resources requests to the DBMS. Which is better?
I also found a lot of question of pasted years, so I'd like to have a fresh answer, in case that something it's changed/improved.
2) Another question...
I tryied to use both of these types and I saw that with boolean, it's easy to check if the value is true or false, but I haven't figured out how to see the value of a variable BIT. I'm my database coloumn I put values 1 or 0, but with a echo of the bit variable, nothing is shown.
So, how can I see the value of a bit (I need to use only 1 or 0).
Thank you in advice!
BOOLEANis just an alias forTINYINY(1); 2. ReadBITtype documentation; 3. Consider use ofSETtype if you have got more than a one flag.[SOLVED]to question titles.