Trying to check and see if a post has a featured image outside of the main loop

has_post_thumbnail() accepts a post ID:

if ( is_singular() and has_post_thumbnail( get_the_ID() )
{
    // show post thumbnail
}
elseif ( is_front_page() )
{
    // show front page content
}
else
{
    // do something else
}

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