I'm trying to write a query with LIKE and != conditions:
SELECT *
FROM posts
WHERE title LIKE 'term%'
OR NAME LIKE 'term%'
AND post_type != 'type';
However, the query results are not being filtered by post_type. Is there something wrong with my syntax?