Tag Archives: CakePHP tinyint(1)

Field type tinyint(1) would not save values other than 0 and 1 in CakePHP

Just a quick note. I had a “is_active” field in my users table which i had been using to store boolean 0 and 1 values. Later, i mean today, i decided to save a new value -1 to this field but when i did try, it would’t save -1 and would always save it as 1. After looking at a few blog posts around the web i found that in CakePHP every time you try to save a value other that 0 or 1 into a tinyint(1) field it would save it as 1 (as according to Nate, Continue reading