I’ve been having a lot of problems with error HY093, and having the wrong number of parameters.
There are some blogs around that imply that you can pass an object converted to an array to the execute function documented below.
$query = $dbh->prepare(
"INSERT INTO `myTable` (ID, Val1, Val2) "
."VALUES(:ID, :Val1, :Val2)");
$query->bindParam(":ID", $crud->ID);However, the documentation above states an FALSE will be returned if you bind more parameters than specified.