SQL enforce value of a column if other column is NOT NULL
Answers to a comment must be on the same article. So is there a way to contraint this? 


If so the logic must be that the record have arcticle_id IS NULL when parent_id IS NOT NULL. And the article ID must be obtained from its parent for that record.

SELECT ... , 
       CASE WHEN t1.parent_id IS NULL 
            THEN t1.article_id 
            ELSE t2.article_id 
       END article_id, 
       ...
FROM table t1
LEFT JOIN table t2
    ON t2.user_id = t1.parent_id
...


So if parent_id is set, the article_id is taken from parent's record, and the value from current record is simply ignored.