mysql not equal operator not working
When I try this query:
SELECT *
FROM sds_posts
WHERE topic_id = '2439'
AND author = ANY (SELECT mid
FROM sds_actions
WHERE whoami = '710' AND type = 'block')
AND status = '1'
AND deleted = '0'
ORDER BY
id ASC
LIMIT 50
it is working correctly.
But I need this one:
SELECT *
FROM sds_posts
WHERE topic_id = '2439'
AND author <> ANY (SELECT mid
FROM sds_actions
WHERE whoami = '710' AND type = 'block')
AND status = '1'
AND deleted = '0'
ORDER BY
id ASC
LIMIT 50
This time query have to select opposite of first query, but it is just select all author. I tried != and also NOT IN, but result is same.
So why? Why does <> not work as expected?