Filter custom posts with / without comments

And I should have done some searching before asking.

Looks like hooking the query might be the best way of doing this. Here’s a good answer from StackOverflow with practically the same question.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)