Can I make a Heading block above a query loop block disappear when that query loop has no results?

Can I make a Heading block above a query loop block disappear when that query loop has no results?

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