Query Post interferes with Pagination

query_posts() is going to alter the main query, and it doesn’t sound like you want that. I would recommended using the WP_Query object to get the other posts.

That said, if you must use query_posts(), call wp_reset_query() at the end of your foreach to reset your main query back to the original one.

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