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


Messages In This Thread
Coddeigniter DB Like Query - by nexobm93 - 10-14-2015, 12:46 AM
RE: Coddeigniter DB Like Query - by Narf - 10-14-2015, 06:22 AM
RE: Coddeigniter DB Like Query - by nexobm93 - 10-14-2015, 11:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB