When I try make a consult with a codition like and a variable bind is returning:
Exception: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
I try put :name: and anothers way of bind and I get the same error or OP CODE error 58
$item = Item::find(
[
'conditions' => "name LIKE '%?0%' ",
'columns' => 'name',
'limit' => 10,
'bind' => [
$busca
],
]
);
If I put literally works:
$item = Item::find(
[
'conditions' => "name LIKE '%Os%' ",
'columns' => 'name',
'limit' => 10,
]
);