How can I check for a thumbnail in WordPress?

You need to use the_post_thumbnail instead of the_thumbnail within the loop. This is how it should be formatted:

<?php if(have_posts()){
    while(have_posts()){
        the_post();
        if(has_post_thumbnail()){
            the_post_thumbnail();
        }
    }
}?>

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