I\'m trying to run a query on a MySQL database, but I found that it seems to be ignoring the \'status\' item.
SELECT * FROM `posts`
WHERE
`tags` LIK
Usually mixing ORs and ANDs is not a smart practice, since you'll get different results based on the execution order and the operator precedence, e.g, true or true and false, can be evaluated as (true or true) and false - yielding false or as true or (true and false) - yielding true.
Use parentheses to separate the ORs and the ANDs, and the execution order will be explicit, like this:
SELECT * FROM `posts`
WHERE (`tags` LIKE '%gda%' OR `tags` LIKE '%contests%' OR `tags` LIKE '%merch%')
AND `newsID` != '2134'
AND `status` > '1'
ORDER BY `postDate` DESC LIMIT 5