According to the PHP manual, the four variable types for mysqli->bind_param are
- integer,
- double,
- string and
- blob.
What is the best way to insert a boolean?
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.
MySQL doesn’t really store booleans anyway, it’s a trick.
The actual format is
TINYINT, which is I guessintegerfor pdo.You will have to convert true/false to 1/0, with
intvalfor example.