Possible Duplicate:
Cannot use call_user_func_array on mysqli_stmt object
I have a piece of mysqli code which is outputting a warning in this line of code:
if (!$stmt = $mysqli->prepare($questionquery)) {
die("Error preparing statement: $mysqli->error");
}
The warning is:
Warning: Wrong parameter count for mysqli_stmt::bind_param() in ... line 80
Below is main code:
// Make the referenced array
$referencedArray = make_values_referenced(array_merge(
array(str_repeat("ss", $numTerms)), // types
$termArray, // where
$termArray // order by
));
// ...or die() is evil in production but I shall assume we are debuggin so I won't complain
if (!$stmt = $mysqli->prepare($questionquery)) {
die("Error preparing statement: $mysqli->error");
}
// Bind parameters
if (!$stmt->bind_param($referencedArray)) {
die("Error binding parameters: $stmt->error");
}