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
#2

what is column name is it  'books.name' or just 'name'
Reply




Theme © iAndrew 2016 - Forum software by © MyBB