ho can I get the number of the current post instead of the post id?

It could be you need offset param in query

$args =  array( 
    'posts_per_page' => 1 // Display only 1 post 
    'offset' => 3 // Display 4th post
);

$query = new WP_Query( $args );

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