I have a problem with binding booleans using mysqli_stmt :: bind_param in PHP5.
The SQL query looks like this: insert into nvp_notes (subject, messageid, receivedate, read) values ββ(?,?,?,?)
Where 'read' is tinyint, either 0 or 1, since I had bit problems using mysqli. Thus, the types that I list in bind_param are as follows:
$stmt->bind_param('sdsd', ...);
I also tried 'sdsb' and 'sdss' but nothing works and I always get the message:
Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement
When I delete the read field in the instruction, everything works fine. I have run out of ideas with this. Of course bind_param works with booleans ??
php mysqli boolean prepared-statement
ian
source share