Maybe a noob question but I have to ask...
This is the query I need:
select title from internships where title like '% someParameter %'
I have to use this in my Repository in my Silex project, so I wrote a function in my repo:
public function getTitleQuery($title) {
return $this->db->fetchAll('select title from internships where title like \'% ? %\' ', array($title));
}
When I escape the single quotes like \'
php sees the question mark as a question mark and not as a parameter.