Kevin Powell - CommunityKP-C
Kevin Powell - Community10mo ago
21 replies
Brightie

true = 1, false != 0, DB refusal

Hey so, basically it's like this:
So I got a checkbox that I have to put in the DB for priority
I already concluded that it just sends either "on" or nothing depending on when its selected or not, it does in fact enter the correct case as well

If I set it to true, it returns as 1, all fine and dandy there
however, in the else statement, if I were to set it to false, it basically sets it to an empty string returning in an error because the DB is expecting a bool (1 or 0, 0 being default)

Why is this?
Is it fixable or should I just stay with the else just setting it to 0?
image.png
image.png
Was this page helpful?