Title: get_users( $args ) crashes database
Last modified: February 9, 2017

---

# get_users( $args ) crashes database

 *  [arathra](https://wordpress.org/support/users/arathra/)
 * (@arathra)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/get_users-args-crashes-database/)
 * I’m trying to use get_users( $args ) but one particular section causes the database
   on the site to crash; some sort of endless loop I think.
 * If I uncomment the lines of the first array here, then the problem arises. I 
   really can’t see why since the array is very similar to subsequent arrays which
   do work.
 * Can anyone help here?
 * Many thanks!
 *     ```
       $subscribed = array (
       	'relation' => 'OR',
       	// if the IM is ANY country we can show the casting
       	//array(
       	//	'key'     => 'im',
       	//	'value'   => 'Email notifications - global',
       	//	'compare' => 'LIKE'
       	//),
       	// or if it's a specific country
       	array(
       		'relation' => 'AND',
       		array(
       			'key'     => 'country',
       			'value'   => $cCountry,
       			'compare' => '='
       		),
       		array(
       			'key'     => 'im',
       			'value'   => 'Email notifications - my country only',
       			'compare' => 'LIKE'
       		)
       	),
       	// or if im hasn't been set (defaults to one country)
       	array(
       		'relation' => 'AND',
       		array(
       			'key'     => 'country',
       			'value'   => $cCountry,
       			'compare' => '='
       		),
       		array(
       			'key'     => 'im',
       			'compare' => 'NOT EXISTS'
       		)
       	)
       );
       ```
   

The topic ‘get_users( $args ) crashes database’ is closed to new replies.

## Tags

 * [arrays](https://wordpress.org/support/topic-tag/arrays/)
 * [database](https://wordpress.org/support/topic-tag/database/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 0 replies
 * 1 participant
 * Last reply from: [arathra](https://wordpress.org/support/users/arathra/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/get_users-args-crashes-database/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
