Why is querying posts messing up my pages?

use wp_reset_query after your loop to restore the global post data for the main loop.

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