Exclude current custom post on single post

Refer to the WP_Query Codex page for a full list and explanation of parameters. The one you want in this case is post__not_in.

$recent = new WP_Query(
    array(
        'post_type' => 'works'
        'posts_per_page' => 5,
        'post__not_in' => array( $currentID )
    )
);

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