Tinyint(1) Doesn't Save Values > 1

When i have a TINYINT(1) field in my database, Yii doesn’t save values > 1 in it (i assume online 0 and 1). But as far as I know the 1 is for display purposes only, so it should save 2 - 9 as well.

It has nothing to do with my validation rules (it’s not set as boolean), because it really depends of what length i’m using for TINYINT.

When i try to insert value ‘5’ for example with phpMyAdmin, it works as well.

What’s the reason behind this?

It’s because many people request for this.

No kidding? so tinyint is like a boolean now?

I’m not kidding. Many people have requested for this. Only tinyint(1) is treated as boolean (mysql uses boolean as a synonym to tinyint(1)). Since (1) only stands for display size (which I think is of little use in this case), you may use a bigger size to avoid this issue.

Ok thanks, I understand, then i should change my TINYINT(1)'s to something larger.