Welcome Guest, Not a member yet? Register   Sign In
Using db->like() breaks when using single quotes?
#1

Hi,

I am creating a simple search for a book name. When I use:

$book_name = "John's Apples";

$this->db->like("books.name", $book_name)->get("books");

The query fails to find any results. I tried outputting the query using $this->db->last_query() and it doesn't really show the ' being escaped. Is this a bug? Should I be handling Like data differently?
Reply


Messages In This Thread
Using db->like() breaks when using single quotes? - by GGitzOle - 01-25-2017, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB