Query to get all the posts of more than 2 meta_value having same meta_key?

From the codex http://codex.wordpress.org/Class_Reference/WP_Query:

 $args = array(
   'post_type' => 'my_custom_post_type',
   'meta_key' => 'age',
   'orderby' => 'meta_value_num',
   'order' => 'ASC',
   'meta_query' => array(
       array(
           'key' => 'age',
           'value' => array(3, 4),
           'compare' => 'IN',
       )
   )
 );
 $query = new WP_Query($args);

Look at the meta_query section. you can define the key and then all the possible values in a array. You can also define the type of comparison (eg. great than, equal, IN).

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