good morning community.
I am writing to you because I would like you to help me please with the following problem.
I have a search engine in my code made in cakephp to perform searches by customer, source address and destination address, when I try to add the code to perform search by id it throws me the following error:
Cannot convert value of type string
to integer
I share part of my code for a better understanding, I thank you in advance for your help
if ($this->request->is('post')){
$q = $_REQUEST['q'];
if ($q){
$q = '%'.$q.'%';
$query = $query->where(['OR' => [
'id LIKE' => $q,
'Clients.name LIKE ' => $q,
'Deliveries.origin_address LIKE ' => $q,
'Deliveries.destination_address LIKE ' => $q
]]);
}
}