It seems I should use tinyint(); but I don’t know how to implement it?
The question is what is your recommendation if I need to have a boolean field in MySQL DB and modify it´s value with PHP
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yep,
TINYINT(1)is the way to go… you can also useBOOLorBOOLEANwhich are synonyms (so it does not make a difference).0evaluates tofalsein PHP and1totrue(actually, any other number than0evaluates totrue, but1is normally used).