How to loop through custom posts in admin edit screen

Yes there is some sort of hook for this: manage_posts_custom_column

Pseudo code:

function my_cpt_custom_column( $column ) {
    global $post;
    if ( 'my_cpt' == get_post_type( $post ) ) {
        switch ( $column ) {
            case 'title':
                // do stuff with $post->post_title
                echo $post->post_title;
                break;
            case 'some-other-heading':
                // do stuff
                break;
        }
    }
}

add_action( 'manage_posts_custom_column', 'my_cpt_custom_column' );

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