Hey,
i get, if i use to bind a variable to a placeholder at Prepared Statements everytime this Error:
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
I have looked after helpful information which can solve this Problem, but i didnt't find anything. And if i find something, this didnt't solved this problem.
If i debug my Code at the Parameters are the value of the Parameter in the url like "Ha". The Error is showing at the DB-Query.
My Code:
$name = $this->request->get("name");
$parameters = [
"name" => $name
];
$foundedNames = Name::findFirst(
[
"name LIKE ' % :name: % ' ",
"bind" => $parameters
]
);
I hope you can help me at solve this Problem.
Conner