Invalid query:
SELECT n.id FROM news n JOIN news_has_category hc ON hc.news_id = n.id WHERE hc.category_id = '31763' AND n.status = 1