Fetch all Posts where logged in user has commented

It should be simple since comments are stored with a user_id if they are created by a logged in user and if not then its set to false so all you need to do is select the post id from comments that are made by user_id bigger the zero, something like this:

function get_posts_with_loogedin_user_comments(){
    global $wpdb;
    $sql = "SELECT DISTINCT  comment_post_ID
            FROM  $wpdb->comments
            WHERE  user_id > 0
            ";
    $post_ids = $wpdb->get_col($sql);
    if ($post_ids)
        return $post_ids;
    return false;
}

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