I have an int field in database and :disabled is supposed to be true false, I am assuming database gets boolean values as integer 0 and 1, but I am unsure.
function loadbyinput($name,$password,$ipnumber="0.0.0.0",$type="member",$disabled=FALSE){
$dbh = new PDO(...);
$statement=$dbh->prepare("insert into
actor(name,password,ipnumber,type,disabled)
values(:name,:password,:ipnumber,:type,:disabled)");
$statement->bindParam(":disabled", $disabled);
}
I am not writing any GUI at the moment so it is hard to test such things for me.
Depends on your schema. For boolean columns in the database you can use the following construct (there is a BOOLEAN construct, but it’s just an alias for TINYINT):
Then when you bind, you can enforce a bool value: