there is a bit(1) type column in database table. but its not working as i expected.
problem is
$invitee = new Invitee();
$invitee->name = "name1";
$invitee->email = "[email protected]";
$invitee->isActive = 0; // "b'0'", '0', false, are also not working
$invitee->save();
I need to put a zero 0 in the isActive column but its getting value 1 every time when i try to add a record with a 0.
and i found a question in here.. but the answers are not describing the cause of the problem. glad if someone can explain the issue.
bitfor something like seems to beboolean?$invitee->isActive = "\0001";? The BIT in MySQL works differently than bool, so you cannot check for 1 or 2. The BIT(m) values range from 1-64. If you would just insert a 1 it will be padded with zeros, for example, assigning a value of b'101' to a BIT(6) column is, in effect, the same as assigning b'000101'.