rastkocvetkovic
Programmer
This is my SQL query:
SELECT * FROM News WHERE (id IN (SELECT news_id FROM LinkingCategoriesNews WHERE news_id = 1) AND active= 1) OR (id = 82) ORDER BY date DESC
I suppose that it should firstly select all News that have ID's in LinkingCategoriesNews. That works, but it is problem that it just selects those. The News with id = 82 isn't included in output. Isn't that how OR is supposed to work? What seems to be the problem? Thanks in advance!
P.S.: I use MS Access over ODBC.
SELECT * FROM News WHERE (id IN (SELECT news_id FROM LinkingCategoriesNews WHERE news_id = 1) AND active= 1) OR (id = 82) ORDER BY date DESC
I suppose that it should firstly select all News that have ID's in LinkingCategoriesNews. That works, but it is problem that it just selects those. The News with id = 82 isn't included in output. Isn't that how OR is supposed to work? What seems to be the problem? Thanks in advance!
P.S.: I use MS Access over ODBC.