I have a query with multiple conditions check. I want to add the condition to check the with like clause. I tried like this.
$params1['email'] =$DB->sql_like('email', '%'.$voucher_query.'%');
and I am passing the params1 value to query condition. I am getting the query as different and it is not working. This is the query I am getting.
SELECT COUNT('x') FROM tbl_order WHERE active_ind = ? AND id = ? AND email = ? [array ( 0 => 1, 1 => 236909, 2 => 'email LIKE %emelchor% COLLATE utf8_bin ESCAPE \'\\\\\'', )]
the email condition is checking with equals to but not with like exactly. Can anyone help me out.?
Thanks in advance