I am trying to set up a query with php and sqlite and the query has multiple LIKE conditions...
$findMe = 'blah';
$nLast = -1;
$nRecord = 5;
$db = new PDO('sqlite:data.db');
$qry = "SELECT *
FROM mytable
WHERE (id > $nLast)
AND ((col1 LIKE '%$findMe%')
OR (col2 LIKE '%$findMe%')
OR (col3 LIKE '%$findMe%')
OR (col4 LIKE '%$findMe%'))
LIMIT $nRecord
ORDER BY id DESC";
$result = $db->query($qry);
...but this will not return any results. if i run the query with just one of the LIKE conditions it will work.