This is my first foray into the world of stack overflow, I'm new to programming and could desperately use some assistance. I'm attempting to dynamically parameterize a mysqli DB query but keep getting an error saying "Wrong parameter count for mysqli_stmt::bind_param()", even though I'm (pretty) sure my counting isn't that bad. Thanks in advance for your help, the relevant code is below.
$search = "SELECT Row1, Row2, Row3, Row4, Row5, Row6 FROM Listings WHERE (Search1 LIKE ?) AND (Search2 LIKE ?) AND (Search3 LIKE ?) AND (Status='Active')";
$params= array(&$param1, &$param2, &$param3);
$stmt = $con2->stmt_init();
if($stmt->prepare($search)) {
call_user_func_array(array($stmt, 'bind_param'), $params);
if($stmt->execute()) {
$stmt->bind_result($Row1, $Row2, $Row3, $Row4, $Row5, $Row6);
echo 'Success';
}
}`