Title: Meta query problem
Last modified: August 21, 2016

---

# Meta query problem

 *  [GWKaplan](https://wordpress.org/support/users/gwkaplan/)
 * (@gwkaplan)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/meta-query-problem/)
 * I have this code:
 *     ```
       'meta_query' => array(
       	'relation' => 'AND',
        	           array(
       		        'key' => 'n_de_personas',
       		        'value' => $selection1,
       		        'compare' => '='
                          ),
       ```
   
 * And it works fine getting from the database the posts whose value of the key 
   matches the value of $selection1 variable. But I need it to work for the values
   that match $selection1 and bigger ones. So I modified the code to:
 *     ```
       'meta_query' => array(
       	'relation' => 'AND',
        	           array(
       		        'key' => 'n_de_personas',
       		        'value' => $selection1,
       		        'compare' => '>='
                          ),
       ```
   
 * And it also works, but only from 0 to 9. When it compares over 10 it goes wrong.
   Please could anybody help?

The topic ‘Meta query problem’ is closed to new replies.

## Tags

 * [meta_query](https://wordpress.org/support/topic-tag/meta_query/)
 * [number](https://wordpress.org/support/topic-tag/number/)
 * [query](https://wordpress.org/support/topic-tag/query/)

 * 0 replies
 * 1 participant
 * Last reply from: [GWKaplan](https://wordpress.org/support/users/gwkaplan/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/meta-query-problem/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
