Query for current post

You shouldn’t be writing any query. WordPress does this for you. You single-{post type}.php template should only contain the standard loop:

<?php 
if ( have_posts() ) : 
    while ( have_posts() ) : the_post(); 
        // Display post content
    endwhile; 
endif; 
?>

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