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
Try to use brackets to emphasize your logical sentences. Such as:
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
Otherwise, your logic gets lost. Also using brackets makes easier to read your SQL sentences.