Welcome Guest, Not a member yet? Register   Sign In
Coddeigniter DB Like Query
#1

Hy guys,

I have a problem with like query.

I use $this->db->like('field', 'value');

All works well but when 'search string' contain 'and' doesn't work.

In this case my search string is 'Health and Safety'. As you can see below, after 'and' word from string exists one more whitespace.

This is what it trying to do.
"WHERE c.course_title LIKE '%Health and Safety%' ESCAPE '!'"

I think this is for security but how can a solve this problem. Cuz my query doesn't works with two whitespaces.

Thanx
Reply
#2

Update CI to version 3.0.2, it's a bug that's already fixed in there.
Reply
#3

(10-14-2015, 06:22 AM)Narf Wrote: Update CI to version 3.0.2, it's a bug that's already fixed in there.

This is good to know. Thanx for your answare. Have a nice day.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB