Only display posts that are in multidimensional meta_value

Solved

So i ended upp with a simple SQL-query:

$sql="SELECT post_id FROM kwido_postmeta WHERE meta_value REGEXP \""'. $area['area'] .'";a:[[:digit:]]+:{[^}]*"'. $mainpost->ID .'"\'';
$results = $wpdb->get_results( $sql, ARRAY_A );

That looks after the current post_id and area with a regex, then if found get the post_id..

$post_ids = array();

foreach ( $results as $result ) {
    $post_ids[] = $result['post_id'];
}

With the post_id:s i make the query with post__in parameter which accept arrays.

$args = array(
    'post_type' => $type_areas[$area['area']],
    'posts_per_page' => '-1',
    'post__not_in'   => $post_ids
);

$query = new WP_Query( $args );

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