how to check for wordpress Query errors

A good pointer would be to enable debugging in WordPress. Add this to your wp-config.php: define( 'WP_DEBUG', true );.

By default WordPress does not show much debug information. More on this here.

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