I’ve ran across a problem where I’m searching the database by a LIKE query:
SELECT description,
title,
hidden
FROM paragraphs
WHERE description LIKE '%some search%'
OR title LIKE '%some search%'
AND hidden = 0
Even when it searches, it should completely ignore records if hidden has a value of 1 in it, because I get returned hidden results.
How do you make a query that checks if hidden is 0 while if it’s 1 the query should skip it those records.
Put the like’s in brackets.