I need this query to select all posts where category = logotypes and full_text is LIKE the searchword just like it already does.
SELECT *
FROM posts
WHERE category = :logotypes
AND full_text LIKE CONCAT('%', :term, '%')
ORDER BY post_date DESC
But I want the searchword to also check if any matches were done in heading like:
SELECT *
FROM posts
WHERE category = :logotypes
AND full_text LIKE CONCAT('%', :term, '%')
--> ALSO CHECK heading LIKE CONCAT('%', :term, '%')
ORDER BY post_date DESC
How do I do?
P.S the category should always remain. It have to still be category = :logotypes
Simply replace
ALSO CHECKbyOR:Observe the parentheses around the
OR-connected predicate