next/prev post link by relationship post 2 post

this works.

$connection_type="posts_to_pages";
$items = p2p_type($connection_type)->get_adjacent_items( $episode_id );

if ( $items['previous'] )
  echo get_permalink($items['previous']->ID);

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